<?xml version="1.0" encoding="UTF-8" ?>
<DataIntegratorExport repositoryVersion="12.2.2.0000" productVersion="12.2.3.2">
<DIDatabaseDatastore name="DWSTAGING_DS" typeId="3" >
<DIAttributes>
<DIAttribute name="DBLiveLoad" value="no"/>
<DIAttribute name="application_type" value="Custom"/>
<DIAttribute name="cdc_enabled" value="no"/>
<DIAttribute name="datastore_repotype" value="local"/>
<DIAttribute name="ds_configuration_enabled" value="yes"/>
<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">

<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DWSTAGING_ALIAS</db_alias_name1>
<db_alias_user1>dwst</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;9FA3E42F1AB29C1A240FBFA241A83F373415575169CA3130A2F2C50213AED23D</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwst</user>
</DSConfiguration>
</DSConfigurations>

</DIAttribute>
<DIAttribute name="enable_data_transfer" value="yes"/>
<DIAttribute name="import_unknown_type" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="unknown_type_size" value="255"/>
</DIAttributes>
</DIDatabaseDatastore>
<DIDatabaseDatastore name="DW_ABC_DS" typeId="3" >
<DIAttributes>
<DIAttribute name="DBLiveLoad" value="no"/>
<DIAttribute name="application_type" value="Custom"/>
<DIAttribute name="cdc_enabled" value="no"/>
<DIAttribute name="datastore_repotype" value="local"/>
<DIAttribute name="ds_configuration_enabled" value="yes"/>
<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">

<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_ABC_ALIAS</db_alias_name1>
<db_alias_user1>dwabc</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;89770408927C5ECAB76D9855E0DA5FE4F25B0E2949263E3397D5BD72B1A30930</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwabc</user>
</DSConfiguration>
</DSConfigurations>

</DIAttribute>
<DIAttribute name="enable_data_transfer" value="yes"/>
<DIAttribute name="import_unknown_type" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="unknown_type_size" value="255"/>
</DIAttributes>
</DIDatabaseDatastore>
<DIDatabaseDatastore name="DW_METADATA_DS" typeId="3" >
<DIAttributes>
<DIAttribute name="DBLiveLoad" value="no"/>
<DIAttribute name="application_type" value="Custom"/>
<DIAttribute name="cdc_enabled" value="no"/>
<DIAttribute name="datastore_repotype" value="local"/>
<DIAttribute name="ds_configuration_enabled" value="yes"/>
<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">

<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_METADATA_ALIAS</db_alias_name1>
<db_alias_user1>dwmetadata</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;085A6DF93DA01ED1DEA3BB1DC1D656C0EF56E65913FB53605B75804428674DE2</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwmetadata</user>
</DSConfiguration>
</DSConfigurations>

</DIAttribute>
<DIAttribute name="enable_data_transfer" value="yes"/>
<DIAttribute name="import_unknown_type" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="unknown_type_size" value="255"/>
</DIAttributes>
</DIDatabaseDatastore>
<DIDatabaseDatastore name="DW_DS" typeId="3" >
<DIAttributes>
<DIAttribute name="DBLiveLoad" value="no"/>
<DIAttribute name="application_type" value="Custom"/>
<DIAttribute name="cdc_enabled" value="no"/>
<DIAttribute name="datastore_repotype" value="local"/>
<DIAttribute name="ds_configuration_enabled" value="yes"/>
<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">

<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_ALIAS</db_alias_name1>
<db_alias_user1>dwt</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;C7D0EC161CA52183B3F6AA62065D16D75A3E6AAF455B3AE46139988B48682A4A</password>
<sql_server_database>XsTarget</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwt</user>
</DSConfiguration>
</DSConfigurations>

</DIAttribute>
<DIAttribute name="enable_data_transfer" value="yes"/>
<DIAttribute name="import_unknown_type" value="no"/>
<DIAttribute name="name" value="DW_DS"/>
<DIAttribute name="unknown_type_size" value="255"/>
</DIAttributes>
</DIDatabaseDatastore>
<DITable name="EXCHANGE_CSNP" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Updates" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Deletes" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Elapsed_Time_For_Load" value="1 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_FLAG" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="MD_ENTERPRISE_KEY" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_CSNP" unique="true">
<DIIndexColumn name="MD_ENTERPRISE_KEY" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_DIM_XFRD" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="0" />
<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_DELETEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSENDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="PK_EXCHANGE_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_DIM_XFRD" unique="true">
<DIIndexColumn name="PK_EXCHANGE_ID" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_DIM_XFRN" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Elapsed_Time_For_Load" value="4 Seconds" />
<DIAttribute name="Number_Of_Updates" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Deletes" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSENDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="MD_DELETEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="false" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="PK_EXCHANGE_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_DIM_XFRN" unique="true">
<DIIndexColumn name="PK_EXCHANGE_ID" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_DIM_XFRU" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="0" />
<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_DELETEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSENDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="PK_EXCHANGE_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_DIM_XFRU" unique="true">
<DIIndexColumn name="PK_EXCHANGE_ID" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_ENTERPRISE_XREF" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="0" />
<DIAttribute name="Number_Of_Updates" value="0" />
<DIAttribute name="Number_Of_Deletes" value="0" />
<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="BUSINESS_KEYVALUE" datatype="VARCHAR" size="100" nullable="true" >
</DIColumn>
<DIColumn name="CREATEDDATETIME" datatype="DATETIME" nullable="false" >
</DIColumn>
<DIColumn name="SOURCE_INTEGRATION_XREF_ID" datatype="DECIMAL" precision="18" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="ENTERPRISE_XREF_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="UPDATE_STATUS" datatype="VARCHAR" size="20" nullable="false" >
</DIColumn>
<DIColumn name="MODIFIEDDATETIME" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_CP_ID" datatype="DECIMAL" precision="28" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="ENTERPRISE_XREF_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_ENTERPRISE_XREF" unique="true">
<DIIndexColumn name="ENTERPRISE_XREF_ID" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_HISTORY_ENTERPRISE_XREF" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Updates" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Deletes" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MODIFIEDDATETIME" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="ENTERPRISE_XREF_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="UPDATE_STATUS" datatype="VARCHAR" size="20" nullable="false" >
</DIColumn>
<DIColumn name="ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="BUSINESS_KEYVALUE" datatype="VARCHAR" size="100" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_INTEGRATION_XREF_ID" datatype="DECIMAL" precision="18" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="CREATEDDATETIME" datatype="DATETIME" nullable="false" >
</DIColumn>
<DIColumn name="MD_CP_ID" datatype="DECIMAL" precision="28" scale="0" nullable="false" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="ENTERPRISE_XREF_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_HISTORY_ENTERPRISE_XREF" unique="true">
<DIIndexColumn name="ENTERPRISE_XREF_ID" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_KEY_LOOKUP" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Updates" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Deletes" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Elapsed_Time_For_Load" value="1 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_EFFECTIVEENDEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_SURROGATE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_EFFECTIVESTARTEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_FLAG" datatype="VARCHAR" size="10" nullable="false" >
</DIColumn>
<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="false" >
</DIColumn>
<DIColumn name="PK_EXCHANGE_LOOKUP_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="PK_EXCHANGE_LOOKUP_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_KEY_LOOKUP" unique="true">
<DIIndexColumn name="PK_EXCHANGE_LOOKUP_ID" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_MSC" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="0" />
<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_FLAG" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="MD_ENTERPRISE_KEY" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_MSC" unique="true">
<DIIndexColumn name="MD_ENTERPRISE_KEY" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_MSC_STG" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Elapsed_Time_For_Load" value="1 Seconds" />
<DIAttribute name="Number_Of_Updates" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Deletes" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="MD_FLAG" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="MD_ENTERPRISE_KEY" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_MSC_STG" unique="true">
<DIIndexColumn name="MD_ENTERPRISE_KEY" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_MSI" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="0" />
<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_CP_ID" datatype="DECIMAL" precision="28" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_FLAG" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" nullable="false" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_QUALIFIER" datatype="VARCHAR" size="200" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="MD_CP_ID" />
<DIPrimaryKeyColumn name="MD_BUSINESS_KEY" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_MSI" unique="true">
<DIIndexColumn name="MD_CP_ID" />
<DIIndexColumn name="MD_BUSINESS_KEY" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_SSI_V" owner="dwst" datastore="DWSTAGING_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="db_alias_name" value="DWSTAGING_ALIAS" />
</DIProperties>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" nullable="false" >
</DIColumn>
<DIColumn name="MD_CP_ID" datatype="DECIMAL" precision="10" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_FLAG" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_QUALIFIER" datatype="VARCHAR" size="200" nullable="true" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="MD_BUSINESS_KEY" />
<DIPrimaryKeyColumn name="MD_CP_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_SSI_V" unique="true">
<DIIndexColumn name="MD_BUSINESS_KEY" />
<DIIndexColumn name="MD_CP_ID" />
</DITableIndex>
</DITable>
<DITable name="FILE_LOCATION_INFO" owner="dwmetadata" datastore="DW_METADATA_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="db_alias_name" value="DW_METADATA_ALIAS" />
</DIProperties>
<DIColumn name="ID" datatype="DECIMAL" precision="10" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="SOURCE" datatype="VARCHAR" size="30" nullable="true" >
</DIColumn>
<DIColumn name="FILE_LOCATION" datatype="VARCHAR" size="200" nullable="true" >
</DIColumn>
</DITable>
<DITable name="EXCHANGE_DIM" owner="dwt" datastore="DW_DS" database="XsTarget" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Updates" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Deletes" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />
<DIAttribute name="db_alias_name" value="DW_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="false" >
</DIColumn>
<DIColumn name="MD_DELETEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSENDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="PK_EXCHANGE_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_DIM" unique="true">
<DIIndexColumn name="PK_EXCHANGE_ID" />
</DITableIndex>
</DITable>
<DITable name="EXCHANGE_DIM_V" owner="dwt" datastore="DW_DS" database="XsTarget" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="db_alias_name" value="DW_ALIAS" />
</DIProperties>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="END_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="END_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="EXCHANGE_RATE" datatype="DOUBLE" nullable="true" >
</DIColumn>
<DIColumn name="IS_CURRENT" datatype="VARCHAR" size="1" nullable="true" >
</DIColumn>
<DIColumn name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="false" >
</DIColumn>
<DIColumn name="MD_DELETEDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSENDDATE" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" nullable="false" >
</DIColumn>
<DIColumn name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" nullable="true" >
</DIColumn>
<DIColumn name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_LOC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="START_DATE_UTC" datatype="DATETIME" nullable="true" >
</DIColumn>
<DIColumn name="TARGET_CURRENCY" datatype="VARCHAR" size="3" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="PK_EXCHANGE_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_EXCHANGE_DIM_V" unique="true">
<DIIndexColumn name="PK_EXCHANGE_ID" />
</DITableIndex>
</DITable>
<DIScriptFunction name="ABC_ADDAUDITMEASURE_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="print('Saving audit measure for process ID = {$p_process_id}');&#xA;print('-&gt;  job stream step detail name = {$p_job_stream_step_detail_name}');&#xA;print('-&gt;  name = {$p_name}');&#xA;print('-&gt;  value = {$p_value}');&#xA;print('-&gt;  category = {$p_category}');&#xA;print('-&gt;  description = {$p_description}');&#xA;&#xA;sql('DW_ABC_DS','insert into AUDIT_MEASURE &#xA;&#x9;&#x9;(MD_PROCESS_ID, JOB_STREAM_STEP_DETAIL_NAME, NAME, VALUE, UNIT, CATEGORY, DESCRIPTION) &#xA;&#x9;&#x9;VALUES ({$p_process_id},{$p_job_stream_step_detail_name},{$p_name},{$p_value},{$p_unit},{$p_category}, {$p_description} )');&#xA;&#xA;# retrieve the affected ID &#xA;$l_created_key = sql('DW_ABC_DS','SELECT AUDIT_MEASURE_ID from AUDIT_MEASURE where MD_PROCESS_ID = {$p_process_id} AND JOB_STREAM_STEP_DETAIL_NAME = {$p_job_stream_step_detail_name} AND NAME = {$p_name}'); &#xA;print('-&gt;  l_created_key = {$l_created_key}');&#xA;&#xA;&#xA;return $l_created_key;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_job_stream_step_detail_name" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_name" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_value" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_unit" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_category" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_description" datatype="VARCHAR" size="255" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_created_key" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('Saving audit measure for process ID = {$p_process_id}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="Saving audit measure for process ID = {$p_process_id}" datatype="VARCHAR" size="53" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  job stream step detail name = {$p_job_stream_step_detail_name}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  job stream step detail name = {$p_job_stream_step_detail_name}" datatype="VARCHAR" size="66" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  name = {$p_name}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  name = {$p_name}" datatype="VARCHAR" size="20" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  value = {$p_value}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  value = {$p_value}" datatype="VARCHAR" size="22" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  category = {$p_category}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  category = {$p_category}" datatype="VARCHAR" size="28" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  description = {$p_description}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  description = {$p_description}" datatype="VARCHAR" size="34" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into AUDIT_MEASURE &#xA;&#x9;&#x9;(MD_PROCESS_ID, JOB_STREAM_STEP_DETAIL_NAME, NAME, VALUE, UNIT, CATEGORY, DESCRIPTION) &#xA;&#x9;&#x9;VALUES ({$p_process_id},{$p_job_stream_step_detail_name},{$p_name},{$p_value},{$p_unit},{$p_category}, {$p_description} )')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into AUDIT_MEASURE &#xA;&#x9;&#x9;(MD_PROCESS_ID, JOB_STREAM_STEP_DETAIL_NAME, NAME, VALUE, UNIT, CATEGORY, DESCRIPTION) &#xA;&#x9;&#x9;VALUES ({$p_process_id},{$p_job_stream_step_detail_name},{$p_name},{$p_value},{$p_unit},{$p_category}, {$p_description} )" datatype="VARCHAR" size="240" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_created_key" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT AUDIT_MEASURE_ID from AUDIT_MEASURE where MD_PROCESS_ID = {$p_process_id} AND JOB_STREAM_STEP_DETAIL_NAME = {$p_job_stream_step_detail_name} AND NAME = {$p_name}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT AUDIT_MEASURE_ID from AUDIT_MEASURE where MD_PROCESS_ID = {$p_process_id} AND JOB_STREAM_STEP_DETAIL_NAME = {$p_job_stream_step_detail_name} AND NAME = {$p_name}" datatype="VARCHAR" size="168" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  l_created_key = {$l_created_key}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  l_created_key = {$l_created_key}" datatype="VARCHAR" size="36" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$l_created_key" >
<VARIABLE_REFERENCE name="$l_created_key" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_ADDAUDITMETRIC_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="print('Saving audit metric for process ID = {$p_process_id}');&#xA;print('-&gt;  job stream step detail name = {$p_job_stream_step_detail_name}');&#xA;print('-&gt;  name = {$p_name}');&#xA;print('-&gt;  value = {$p_value}');&#xA;print('-&gt;  status = {$p_status}');&#xA;print('-&gt;  status_info = {$p_status_info}');&#xA;print('-&gt;  category = {$p_category}');&#xA;print('-&gt;  description = {$p_description}');&#xA;&#xA;sql('DW_ABC_DS','insert into AUDIT_METRIC &#xA;&#x9;&#x9;(MD_PROCESS_ID, JOB_STREAM_STEP_DETAIL_NAME, NAME, VALUE, UNIT, STATUS, STATUS_INFO, CATEGORY, DESCRIPTION) &#xA;&#x9;&#x9;VALUES ({$p_process_id},{$p_job_stream_step_detail_name},{$p_name},{$p_value},{$p_unit},{$p_status},{$p_status_info},{$p_category}, {$p_description} )');&#xA;&#xA;&#xA;# retrieve the affected ID &#xA;$l_created_key = sql('DW_ABC_DS','SELECT AUDIT_METRIC_ID from AUDIT_METRIC where MD_PROCESS_ID = {$p_process_id} AND JOB_STREAM_STEP_DETAIL_NAME = {$p_job_stream_step_detail_name} AND NAME = {$p_name}'); &#xA;&#xA;return $l_created_key;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_job_stream_step_detail_name" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_name" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_value" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_unit" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_status" datatype="VARCHAR" size="20" >
</DIElement>
<DIElement paramType="IN" name="$p_status_info" datatype="VARCHAR" size="255" >
</DIElement>
<DIElement paramType="IN" name="$p_category" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="IN" name="$p_description" datatype="VARCHAR" size="255" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_created_key" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('Saving audit metric for process ID = {$p_process_id}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="Saving audit metric for process ID = {$p_process_id}" datatype="VARCHAR" size="52" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  job stream step detail name = {$p_job_stream_step_detail_name}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  job stream step detail name = {$p_job_stream_step_detail_name}" datatype="VARCHAR" size="66" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  name = {$p_name}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  name = {$p_name}" datatype="VARCHAR" size="20" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  value = {$p_value}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  value = {$p_value}" datatype="VARCHAR" size="22" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  status = {$p_status}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  status = {$p_status}" datatype="VARCHAR" size="24" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  status_info = {$p_status_info}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  status_info = {$p_status_info}" datatype="VARCHAR" size="34" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  category = {$p_category}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  category = {$p_category}" datatype="VARCHAR" size="28" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('-&gt;  description = {$p_description}')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="-&gt;  description = {$p_description}" datatype="VARCHAR" size="34" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into AUDIT_METRIC &#xA;&#x9;&#x9;(MD_PROCESS_ID, JOB_STREAM_STEP_DETAIL_NAME, NAME, VALUE, UNIT, STATUS, STATUS_INFO, CATEGORY, DESCRIPTION) &#xA;&#x9;&#x9;VALUES ({$p_process_id},{$p_job_stream_step_detail_name},{$p_name},{$p_value},{$p_unit},{$p_status},{$p_status_info},{$p_category}, {$p_description} )')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into AUDIT_METRIC &#xA;&#x9;&#x9;(MD_PROCESS_ID, JOB_STREAM_STEP_DETAIL_NAME, NAME, VALUE, UNIT, STATUS, STATUS_INFO, CATEGORY, DESCRIPTION) &#xA;&#x9;&#x9;VALUES ({$p_process_id},{$p_job_stream_step_detail_name},{$p_name},{$p_value},{$p_unit},{$p_status},{$p_status_info},{$p_category}, {$p_description} )" datatype="VARCHAR" size="289" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_created_key" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT AUDIT_METRIC_ID from AUDIT_METRIC where MD_PROCESS_ID = {$p_process_id} AND JOB_STREAM_STEP_DETAIL_NAME = {$p_job_stream_step_detail_name} AND NAME = {$p_name}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT AUDIT_METRIC_ID from AUDIT_METRIC where MD_PROCESS_ID = {$p_process_id} AND JOB_STREAM_STEP_DETAIL_NAME = {$p_job_stream_step_detail_name} AND NAME = {$p_name}" datatype="VARCHAR" size="166" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$l_created_key" >
<VARIABLE_REFERENCE name="$l_created_key" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_AUDIT_ASSOCIATE_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="ETL_PRINT('Saving audit measure and metric association');&#xA;ETL_PRINT('-&gt; p_measure_id = {$p_measure_id}');&#xA;ETL_PRINT('-&gt; p_metric_id  = {$p_metric_id}');&#xA;&#xA;if ($p_measure_id IS NOT NULL and $p_metric_id IS NOT NULL)&#xA;begin&#xA;sql('DW_ABC_DS','insert into AUDIT_MEASURE_METRIC_ASSOC &#xA;&#x9;&#x9;(AUDIT_MEASURE_ID, AUDIT_METRIC_ID) &#xA;&#x9;&#x9;VALUES ({$p_measure_id},{$p_metric_id} )');&#xA;end &#xA;else &#xA;begin&#xA;ETL_PRINT('Cannot save association when the measure or metric could not be found');&#x9;&#xA;end&#xA;return NULL;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_measure_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_metric_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('Saving audit measure and metric association')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="Saving audit measure and metric association" datatype="VARCHAR" size="43" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('-&gt; p_measure_id = {$p_measure_id}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="-&gt; p_measure_id = {$p_measure_id}" datatype="VARCHAR" size="33" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('-&gt; p_metric_id  = {$p_metric_id}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="-&gt; p_metric_id  = {$p_metric_id}" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(($p_measure_id IS NOT  NULL ) AND&#xA;   ($p_metric_id IS NOT  NULL ))" >
<LOGICAL_OP op="AND">
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$p_measure_id" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$p_metric_id" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into AUDIT_MEASURE_METRIC_ASSOC &#xA;&#x9;&#x9;(AUDIT_MEASURE_ID, AUDIT_METRIC_ID) &#xA;&#x9;&#x9;VALUES ({$p_measure_id},{$p_metric_id} )')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into AUDIT_MEASURE_METRIC_ASSOC &#xA;&#x9;&#x9;(AUDIT_MEASURE_ID, AUDIT_METRIC_ID) &#xA;&#x9;&#x9;VALUES ({$p_measure_id},{$p_metric_id} )" datatype="VARCHAR" size="121" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('Cannot save association when the measure or metric could not be found')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="Cannot save association when the measure or metric could not be found" datatype="VARCHAR" size="69" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_ENDJB_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#UPDATE STEP_RUNTIME RECORD WITH SUCCESS STATUS AND END TIME&#xA;#GET JOB_ID&#xA;&#xA;$l_status = 'SUCCESS';&#xA;#$now = sysdate();&#xA;&#xA;$l_wf_failed_count = sql('DW_ABC_DS',' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')');&#xA;ETL_PRINT( '**     wf_failed_count = {$l_wf_failed_count}' );&#xA;&#xA;$l_wf_success_count = sql('DW_ABC_DS',' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'');&#xA;ETL_PRINT( '**     wf_success_count = {$l_wf_success_count}' );&#xA;&#xA;$l_am_failed_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')');&#xA;ETL_PRINT( '**     am_failed_count = {$l_am_failed_count}' );&#xA;&#xA;$l_am_warning_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'WARNING\'');&#xA;ETL_PRINT( '**     am_warning_count = {$l_am_warning_count}' );&#xA;&#xA;$l_am_success_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'');&#xA;ETL_PRINT( '**     am_success_count = {$l_am_success_count}' );&#xA;&#xA;$l_status_info = 'WFs statuses: success: ' || $l_wf_success_count || ', error: '  || $l_wf_failed_count ||' || Audit metrics: success: ' || $l_am_success_count || ', warning: ' || $l_am_warning_count || ', error: ' || $l_am_failed_count || '.';&#xA;&#xA;if ($l_wf_failed_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'ERROR';&#xA;&#x9;$l_reco_action =  'Drill to WF level to access the error message. ';&#xA;end&#x9;&#xA;else if ($l_am_failed_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'ERROR'; &#xA;&#x9;$l_reco_action = $l_reco_action || 'Refer to failed metrics. ';&#xA;end&#xA;else if ($l_am_warning_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'WARNING';&#xA;&#x9;$l_reco_action = $l_reco_action || 'Check WARNING metrics. ';&#xA;end&#xA;&#xA;&#xA;#sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;#               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = {sysdate()}, STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;#               where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}');&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '** The Job {job_name()} is ending' );&#xA;ETL_PRINT( '**   status: {$l_status}' );&#xA;ETL_PRINT( '**   explanation: {$l_status_info})' );&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '********************************' );&#xA;&#xA;return NULL;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_wf_failed_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_status" datatype="VARCHAR" size="10" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_wf_success_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_status_info" datatype="VARCHAR" size="400" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_am_failed_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_am_warning_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_am_success_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_reco_action" datatype="VARCHAR" size="4000" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'SUCCESS'" >
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_wf_failed_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = 'ERROR' or status = 'MAX_EXECUTION_TIME_EXCEEDED')" datatype="VARCHAR" size="175" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     wf_failed_count = {$l_wf_failed_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     wf_failed_count = {$l_wf_failed_count}" datatype="VARCHAR" size="45" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_wf_success_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = 'SUCCESS'" datatype="VARCHAR" size="134" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     wf_success_count = {$l_wf_success_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     wf_success_count = {$l_wf_success_count}" datatype="VARCHAR" size="47" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_am_failed_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = 'ERROR' or status = 'MAX_EXECUTION_TIME_EXCEEDED')" datatype="VARCHAR" size="162" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     am_failed_count = {$l_am_failed_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     am_failed_count = {$l_am_failed_count}" datatype="VARCHAR" size="45" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_am_warning_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'WARNING\'')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = 'WARNING'" datatype="VARCHAR" size="120" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     am_warning_count = {$l_am_warning_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     am_warning_count = {$l_am_warning_count}" datatype="VARCHAR" size="47" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_am_success_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = 'SUCCESS'" datatype="VARCHAR" size="120" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     am_success_count = {$l_am_success_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     am_success_count = {$l_am_success_count}" datatype="VARCHAR" size="47" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_status_info" >
<DIExpression isString="true" expr="(((((((((('WFs statuses: success: ' || $l_wf_success_count) || ', error: ') || $l_wf_failed_count) || ' || Audit metrics: success: ') || $l_am_success_count) || ', warning: ') || $l_am_warning_count) || ', error: ') || $l_am_failed_count) || '.')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="WFs statuses: success: " datatype="VARCHAR" size="23" />
<VARIABLE_REFERENCE name="$l_wf_success_count" />
</CONCAT>
<CONSTANT value=", error: " datatype="VARCHAR" size="9" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_wf_failed_count" />
</CONCAT>
<CONSTANT value=" || Audit metrics: success: " datatype="VARCHAR" size="28" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_am_success_count" />
</CONCAT>
<CONSTANT value=", warning: " datatype="VARCHAR" size="11" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_am_warning_count" />
</CONCAT>
<CONSTANT value=", error: " datatype="VARCHAR" size="9" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_am_failed_count" />
</CONCAT>
<CONSTANT value="." datatype="VARCHAR" size="1" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_wf_failed_count &gt; 0)" >
<LOGICAL_OP op="GT">
<VARIABLE_REFERENCE name="$l_wf_failed_count" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'ERROR'" >
<CONSTANT value="ERROR" datatype="VARCHAR" size="5" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_reco_action" >
<DIExpression isString="true" expr="'Drill to WF level to access the error message. '" >
<CONSTANT value="Drill to WF level to access the error message. " datatype="VARCHAR" size="47" />
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_am_failed_count &gt; 0)" >
<LOGICAL_OP op="GT">
<VARIABLE_REFERENCE name="$l_am_failed_count" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'ERROR'" >
<CONSTANT value="ERROR" datatype="VARCHAR" size="5" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_reco_action" >
<DIExpression isString="true" expr="($l_reco_action || 'Refer to failed metrics. ')" >
<CONCAT>
<VARIABLE_REFERENCE name="$l_reco_action" />
<CONSTANT value="Refer to failed metrics. " datatype="VARCHAR" size="25" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_am_warning_count &gt; 0)" >
<LOGICAL_OP op="GT">
<VARIABLE_REFERENCE name="$l_am_warning_count" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'WARNING'" >
<CONSTANT value="WARNING" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_reco_action" >
<DIExpression isString="true" expr="($l_reco_action || 'Check WARNING metrics. ')" >
<CONCAT>
<VARIABLE_REFERENCE name="$l_reco_action" />
<CONSTANT value="Check WARNING metrics. " datatype="VARCHAR" size="23" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
</DIElse>
</DIIfStep>
</DIElse>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = 'FINISHED' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="272" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('** The Job {job_name()} is ending')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="** The Job {job_name()} is ending" datatype="VARCHAR" size="33" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**   status: {$l_status}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**   status: {$l_status}" datatype="VARCHAR" size="24" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**   explanation: {$l_status_info})')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**   explanation: {$l_status_info})" datatype="VARCHAR" size="35" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_ENDWF_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="&#xA;# LOOP THROUGH ALL VALUES IN INPUT PARAMETER TARGET_TABLE FIELD&#xA;# UPDATE EACH VALUE (IN DELIMITED STRING) AS SINGLE RECORD WITH ENDDATE&#xA;# CHECK THAT ABC_ENDWF_FN CANNOT BE CALLED BEFORE ABC_STARTWF_FN&#xA;&#xA;$l_previous_status = sql('DW_ABC_DS','select STATUS from JOB_STREAM_STEP_DETAIL_RT&#xA;                                      where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#xA;if ($l_previous_status is null)&#xA;#  sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;#                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;#                   VALUES ({$p_process_id}, {$p_detailname}, \'ERROR\', {sysdate()})');&#x9;&#xD;&#xA;  sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;                   VALUES ({$p_process_id}, {$p_detailname}, \'ERROR\', convert(datetime,{sysdate()},111))');&#x9;&#xA;else&#xA;  begin&#xA;    if ($l_previous_status = 'RUNNING')&#xA;      sql('DW_ABC_DS','update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'SUCCESS\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#x9;else&#xA;      sql('DW_ABC_DS','update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'ERROR\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#x9;&#xA;  end&#xA;&#xA;ETL_PRINT( '        ** The workflow: [workflow_name()] is ending' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;&#xA;&#xA;&#xA;&#xA;  "/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_previous_status" datatype="VARCHAR" size="12" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$l_previous_status" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select STATUS from JOB_STREAM_STEP_DETAIL_RT&#xA;                                      where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select STATUS from JOB_STREAM_STEP_DETAIL_RT&#xA;                                      where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="155" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_previous_status IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$l_previous_status" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;                   VALUES ({$p_process_id}, {$p_detailname}, \'ERROR\', convert(datetime,{sysdate()},111))')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;                   VALUES ({$p_process_id}, {$p_detailname}, 'ERROR', convert(datetime,{sysdate()},111))" datatype="VARCHAR" size="211" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_previous_status = 'RUNNING')" >
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$l_previous_status" />
<CONSTANT value="RUNNING" datatype="VARCHAR" size="7" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'SUCCESS\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = 'SUCCESS', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="243" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'ERROR\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = 'ERROR', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="241" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIElse>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ** The workflow: [workflow_name()] is ending')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ** The workflow: [workflow_name()] is ending" datatype="VARCHAR" size="52" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />
<FUNCTION_CALL name="system_user_name"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_detailname" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_FAILJB_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="# IN EVENT THE JOB FAILED, UPDATE JOB RECORD WITH FAIL STATUS&#xA;&#xA;&#xA;if ($p_process_id is null)&#xA;  begin&#xA; &#x9; ETL_PRINT( 'ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)' );&#xA; &#x9; ETL_PRINT( 'AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)' );&#xA;  end&#xA;else&#xA;  begin&#xA;&#x9; $l_status_text = replace_substr( $p_status_info, '\'','\'\'');&#xA; &#x9; sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;                 set STATE = \'FINISHED\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} ');&#xA;&#xA;  end&#xA;&#xA;&#xA;ETL_PRINT( '        ** The Job : [job_name()] FAILED' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   status info: ' || $p_status_info );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_status_info" datatype="VARCHAR" size="400" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_status_text" datatype="VARCHAR" size="400" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_process_id IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_process_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)" datatype="VARCHAR" size="84" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)" datatype="VARCHAR" size="120" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$l_status_text" >
<DIExpression isString="true" expr="replace_substr($p_status_info, '\'', '\'\'')" >
<FUNCTION_CALL name="replace_substr"  type="DI" >
<VARIABLE_REFERENCE name="$p_status_info" />
<CONSTANT value="'" datatype="VARCHAR" size="1" />
<CONSTANT value="''" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT&#xA;                 set STATE = \'FINISHED\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT&#xA;                 set STATE = 'FINISHED', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = 'ERROR', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} " datatype="VARCHAR" size="241" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ** The Job : [job_name()] FAILED')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ** The Job : [job_name()] FAILED" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />
<FUNCTION_CALL name="system_user_name"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   status info: ' || $p_status_info))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   status info: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_status_info" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_FAILWF_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="# IN EVENT THE WORKFLOW FAILED, UPDATE WORKFLOW RECORD WITH FAIL STATUS&#xA;&#xA;$l_status_text = replace_substr( $p_status_info, '\'','\'\'');&#xA;&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#xA;ETL_PRINT( '        ** The workflow: [workflow_name()] FAILED' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   status info: ' || $p_status_info );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_status_info" datatype="VARCHAR" size="400" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_status_text" datatype="VARCHAR" size="400" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$l_status_text" >
<DIExpression isString="true" expr="replace_substr($p_status_info, '\'', '\'\'')" >
<FUNCTION_CALL name="replace_substr"  type="DI" >
<VARIABLE_REFERENCE name="$p_status_info" />
<CONSTANT value="'" datatype="VARCHAR" size="1" />
<CONSTANT value="''" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = 'ERROR', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="262" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ** The workflow: [workflow_name()] FAILED')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ** The workflow: [workflow_name()] FAILED" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />
<FUNCTION_CALL name="system_user_name"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   status info: ' || $p_status_info))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   status info: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_status_info" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_detailname" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_STARTJB_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#$l_job_start_date = sysdate( );&#xD;&#xA;$l_job_start_date = sql('DW_ABC_DS','select getdate()');&#xD;&#xA;$l_job_start_date_vchar = sql('DW_ABC_DS','select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)');&#xD;&#xA;ETL_PRINT('l_job_start_date_vchar = '|| $l_job_start_date_vchar);&#xD;&#xA;#sql('DW_ABC_DS','select convert(datetime,GETDATE()-5,111)');&#xD;&#xA;#;&#xA;# the job may have been called from the DW scheduler as part of a job stream&#xA;# or it may be launched manually &#xA;# if the job is called as part of a job stream&#xA;#   then its row in DW_ABC_DS.STEP_RUNTIME identified by $G_STEP_RT_ID  has already &#xA;#   been created with a WAITING status&#xA;# else&#xA;#   the job has been launched out of a stream context, it will create its own entry &#xA;#   flagged as MANUAL in DW_ABC_DS.STEP_RUNTIME&#xA;       &#xA;if ($p_debug_mode is null or not $p_debug_mode = 1)&#xA;  begin&#xA;    if ($p_process_id is null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1' );&#xA;        raise_exception('$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1');&#xA;      end&#xA;    # retrieve the batch id from the STEP_RUNTIME table&#xA;    $p_batch_id = sql('DW_ABC_DS',&#xA;      'SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;    if ($p_batch_id is null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: Process ' || $p_process_id || ' not found in STEP_RUNTIME table.' );&#xA;        raise_exception('process '||$p_process_id||' is not found in STEP_RUNTIME table.');&#xA;      end&#xA;  end&#xA;else&#xA;  begin&#xA;    if ($p_process_id is not null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode || ' but $G_PROCESS_ID is not null (set to '||$p_process_id||'). In debug mode Process ID will be allocated by the job and cannot be specified');&#xA;        raise_exception('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode || ' but $G_PROCESS_ID is not null (set to '||$p_process_id||'). in debug mode Process ID will be allocated by the system and cannot be specified');&#xA;      end&#xA;    # create the job level row in DW_ABC_DS.STEP_RUNTIME note that only a basic row without start dates is created &#xA;  &#x9;# this will be done in code shared for scheduled and manual rows&#xA;&#xD;&#xA;#    sql('DW_ABC_DS','insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;#                     VALUES ({job_name()},{$l_job_start_date}, \'MANUAL\', \'STARTING\')');&#xA;&#xD;&#xA;    sql('DW_ABC_DS','insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, \'MANUAL\', \'STARTING\')');&#xA;  &#x9;# retrieve the row ID affected by the DB, this ID will be used for any future reference to the STEP_RUNTIME table&#xA;# &#x9;$p_process_id = sql('DW_ABC_DS','SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ');&#xA;#&#x9;ETL_PRINT( 'After manual launch, the assigned Process ID is: ' || $p_process_id );&#xA;&#xD;&#xA; &#x9;$p_process_id = sql('DW_ABC_DS','SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ');&#xA;&#x9;ETL_PRINT( 'After manual launch, the assigned Process ID is: ' || $p_process_id );&#xA;&#x9;# No new batch is created in debug mode, but set 0 to batch-id variable to have a not null value&#xA;&#x9;$p_batch_id = 0;&#xA;  end&#xA;&#xA;&#xA;ETL_PRINT ( 'Process ' || $p_process_id || ' retrieved $p_batch_id = {$p_batch_id}' );&#xA;$l_state = sql('DW_ABC_DS',&#xA;      'SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;$l_job_name = sql('DW_ABC_DS',&#xA;      'SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;if ($l_state != 'STARTING' )&#xA;begin&#xA;    sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATUS_INFO = \'Tried to run job, but it is not in a runnable state.\' &#xA;         where MD_PROCESS_ID = {$p_process_id}');&#xA;    raise_exception('ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)');&#xA;end&#xA;&#xA;if ($l_job_name != job_name() )&#xA;begin&#xA;   # sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATUS_INFO = \'This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run ($l_job_name).\' &#xA;   #      where MD_PROCESS_ID = {$p_process_id}');&#xA;    raise_exception('ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (' || $l_job_name || ').');&#xA;end&#xA;&#xA;# now flag the job as running&#xD;&#xA;#sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;#JOB_NAME = {job_name()}, START_TIME = convert(datetime,{$l_job_start_date},111)&#xA;#where MD_PROCESS_ID = {$p_process_id}');&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;set_env( 'ETL_DEBUG_MODE', $p_debug_mode );&#xA;set_env( 'ETL_BATCH_ID', $p_batch_id);&#xA;set_env( 'ETL_PROCESS_ID', $p_process_id );&#xA;if ( is_set_env( 'ETL_TRACE_LEVEL' ) != 1 )&#xA;begin&#xA;&#x9;set_env( 'ETL_TRACE_LEVEL', 'ALL' );&#xA;end&#xA;&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '** The Job {job_name()} is starting' || ifthenelse((get_env('ETL_DEBUG_MODE') = '1'), ' in Debug mode', '') || '.');&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '**' );&#xA;&#xA;return (5);&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN_OUT" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_debug_mode" datatype="INT" >
</DIElement>
<DIElement paramType="OUT" name="$p_batch_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_previous_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_sqltext" datatype="VARCHAR" size="80" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_job_start_date" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_state" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_job_name" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_job_start_date_vchar" datatype="VARCHAR" size="25" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="DATETIME" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$l_job_start_date" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select getdate()')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select getdate()" datatype="VARCHAR" size="16" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_job_start_date_vchar" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)" datatype="VARCHAR" size="73" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('l_job_start_date_vchar = ' || $l_job_start_date_vchar))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="l_job_start_date_vchar = " datatype="VARCHAR" size="25" />
<VARIABLE_REFERENCE name="$l_job_start_date_vchar" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(($p_debug_mode IS  NULL ) OR&#xA;   ( not ($p_debug_mode = 1)))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_debug_mode" />
</LOGICAL_OP>
<LOGICAL_OP op="NOT">
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$p_debug_mode" />
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_process_id IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_process_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1" datatype="VARCHAR" size="98" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1" datatype="VARCHAR" size="91" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$p_batch_id" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="80" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_batch_id IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_batch_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('ERROR: Process ' || $p_process_id) || ' not found in STEP_RUNTIME table.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: Process " datatype="VARCHAR" size="15" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value=" not found in STEP_RUNTIME table." datatype="VARCHAR" size="33" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception((('process ' || $p_process_id) || ' is not found in STEP_RUNTIME table.'))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="process " datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value=" is not found in STEP_RUNTIME table." datatype="VARCHAR" size="36" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_process_id IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$p_process_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode) || ' but $G_PROCESS_ID is not null (set to ') || $p_process_id) || '). In debug mode Process ID will be allocated by the job and cannot be specified'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: abC usage error detected : $G_DEBUG_MODE is set to " datatype="VARCHAR" size="58" />
<VARIABLE_REFERENCE name="$p_debug_mode" />
</CONCAT>
<CONSTANT value=" but $G_PROCESS_ID is not null (set to " datatype="VARCHAR" size="39" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value="). In debug mode Process ID will be allocated by the job and cannot be specified" datatype="VARCHAR" size="80" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception((((('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode) || ' but $G_PROCESS_ID is not null (set to ') || $p_process_id) || '). in debug mode Process ID will be allocated by the system and cannot be specified'))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: abC usage error detected : $G_DEBUG_MODE is set to " datatype="VARCHAR" size="58" />
<VARIABLE_REFERENCE name="$p_debug_mode" />
</CONCAT>
<CONSTANT value=" but $G_PROCESS_ID is not null (set to " datatype="VARCHAR" size="39" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value="). in debug mode Process ID will be allocated by the system and cannot be specified" datatype="VARCHAR" size="83" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, \'MANUAL\', \'STARTING\')')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, 'MANUAL', 'STARTING')" datatype="VARCHAR" size="164" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$p_process_id" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = 'MANUAL' AND STATE =  'STARTING' " datatype="VARCHAR" size="168" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('After manual launch, the assigned Process ID is: ' || $p_process_id))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="After manual launch, the assigned Process ID is: " datatype="VARCHAR" size="49" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$p_batch_id" >
<DIExpression isString="true" expr="0" >
<CONSTANT value="0" datatype="INT" />
</DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('Process ' || $p_process_id) || ' retrieved $p_batch_id = {$p_batch_id}'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="Process " datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value=" retrieved $p_batch_id = {$p_batch_id}" datatype="VARCHAR" size="38" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_state" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="74" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_job_name" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="77" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_state != 'STARTING')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$l_state" />
<CONSTANT value="STARTING" datatype="VARCHAR" size="8" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT set STATUS_INFO = \'Tried to run job, but it is not in a runnable state.\' &#xA;         where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT set STATUS_INFO = 'Tried to run job, but it is not in a runnable state.' &#xA;         where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="146" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)" datatype="VARCHAR" size="168" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_job_name != job_name())" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$l_job_name" />
<FUNCTION_CALL name="job_name"  type="DI" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception((('ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (' || $l_job_name) || ').'))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (" datatype="VARCHAR" size="94" />
<VARIABLE_REFERENCE name="$l_job_name" />
</CONCAT>
<CONSTANT value=")." datatype="VARCHAR" size="2" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT set STATE = 'RUNNING',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_DEBUG_MODE', $p_debug_mode)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_DEBUG_MODE" datatype="VARCHAR" size="14" />
<VARIABLE_REFERENCE name="$p_debug_mode" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_BATCH_ID', $p_batch_id)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />
<VARIABLE_REFERENCE name="$p_batch_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_PROCESS_ID', $p_process_id)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />
<VARIABLE_REFERENCE name="$p_process_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env('ETL_TRACE_LEVEL') != 1)" >
<LOGICAL_OP op="NE">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_TRACE_LEVEL', 'ALL')" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />
<CONSTANT value="ALL" datatype="VARCHAR" size="3" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('** The Job {job_name()} is starting' || ifthenelse((get_env('ETL_DEBUG_MODE') = '1'), ' in Debug mode', '')) || '.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="** The Job {job_name()} is starting" datatype="VARCHAR" size="35" />
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_DEBUG_MODE" datatype="VARCHAR" size="14" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="VARCHAR" size="1" />
</LOGICAL_OP>
<CONSTANT value=" in Debug mode" datatype="VARCHAR" size="14" />
<CONSTANT value="" datatype="VARCHAR" size="0" />
</FUNCTION_CALL>
</CONCAT>
<CONSTANT value="." datatype="VARCHAR" size="1" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="5" >
<CONSTANT value="5" datatype="INT" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_STARTWF_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ** The workflow [workflow_name()] is starting' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;&#xA;# DELETE EXISTING WORKFLOW RECORD&#xA;#sql('DW_ABC_DS','delete from RDS_DBA.WFEXECUTION_DW&#xA;#where APPNAME = {$p_appname} AND JOBNAME = {job_name()} AND WFNAME = {workflow_name()}&#xA;#AND TARGET_TABLE = {$l_single_tablename}');&#xA;&#xA;# GET MAX_ID FROM THE WFEXECUTION_DW TABLE&#xA;#$job_ maxkey = sql('DW_ABC_DS', 'SELECT MAX(JOB_ID) FROM RDS_DBA.ETLSYNC_DW');&#xA;#$maxkey = $maxkey + 1;&#xA;&#xA;# INSERT WORKFLOW RECORD&#x9;&#x9;&#xD;&#xA;&#xA;#$l_stepdetail_id = sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;#                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;#                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', {sysdate()});&#xA;#&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID');&#xA;$l_stepdetail_id = sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID');&#x9;&#xA;&#xA;set_env(workflow_name(), $l_stepdetail_id);&#xA;&#xA;# print('single_tablename = ' || $l_single_tablename);&#x9;   &#x9;&#xA;&#xA;return null;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_stepdetail_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ** The workflow [workflow_name()] is starting')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ** The workflow [workflow_name()] is starting" datatype="VARCHAR" size="53" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />
<FUNCTION_CALL name="system_user_name"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_detailname" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_stepdetail_id" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, 'RUNNING', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID" datatype="VARCHAR" size="280" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env(workflow_name(), $l_stepdetail_id)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$l_stepdetail_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ETL_PRINT" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="# 1/2 Retrieve contextual information from the environment&#xA;if ( is_set_env( 'ETL_BATCH_ID' ) = 1 )&#xA;begin&#xA;&#x9;$l_batch_id = get_env( 'ETL_BATCH_ID' );&#xA;end&#xA;else&#xA;begin&#xA;&#x9;$l_batch_id = '-';&#xA;end&#xA;&#xA;if ( is_set_env( 'ETL_PROCESS_ID' ) = 1 )&#xA;begin&#xA;&#x9;$l_process_id = get_env( 'ETL_PROCESS_ID' );&#x9;&#xA;end&#xA;else&#xA;begin&#xA;&#x9;$l_process_id = '-';&#x9;&#xA;end&#xA;&#xA;# 2/2 Really print&#xA;if ( get_env('ETL_TRACE_LEVEL') = 'ALL' )&#xA;begin&#xA;&#x9;if ( is_set_env( workflow_name() ) = 1 )&#xA;&#x9;begin&#xA;&#x9;&#x9;$l_stepdetail_id = get_env( workflow_name() );&#xA;&#x9;&#x9;print( '\[Batch:' || $l_batch_id || '\] \[Proc:' || $l_process_id || '\] \[Detail:' || $l_stepdetail_id || '\] ' || $p_MESSAGE );&#xA;&#x9;end&#xA;&#x9;else&#xA;&#x9;begin&#xA;    &#x9;print( '\[Batch:' || $l_batch_id || '\] \[Proc:' || $l_process_id || '\] ' || $p_MESSAGE );&#xA;&#x9;end&#xA;end&#xA;&#xA;return null;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="This function is internal and should NOT be used by application developers.&#xA;&#xA;This function prints the parameter message to the logs with contextual information (batch id, process id) as set by the ABC_STARTJB_FN function.&#xA;&#xA;This trace file is currently the standard Data Services trace file. for instance: C:\Program Files\Business Objects\BusinessObjects Data Services\log\tracelog.txt"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_MESSAGE" datatype="VARCHAR" size="256" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_batch_id" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_process_id" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_stepdetail_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env('ETL_BATCH_ID') = 1)" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_batch_id" >
<DIExpression isString="true" expr="get_env('ETL_BATCH_ID')" >
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$l_batch_id" >
<DIExpression isString="true" expr="'-'" >
<CONSTANT value="-" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env('ETL_PROCESS_ID') = 1)" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_process_id" >
<DIExpression isString="true" expr="get_env('ETL_PROCESS_ID')" >
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$l_process_id" >
<DIExpression isString="true" expr="'-'" >
<CONSTANT value="-" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(get_env('ETL_TRACE_LEVEL') = 'ALL')" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />
</FUNCTION_CALL>
<CONSTANT value="ALL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env(workflow_name()) = 1)" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_stepdetail_id" >
<DIExpression isString="true" expr="get_env(workflow_name())" >
<FUNCTION_CALL name="get_env"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print(((((((('\\[Batch:' || $l_batch_id) || '\\] \\[Proc:') || $l_process_id) || '\\] \\[Detail:') || $l_stepdetail_id) || '\\] ') || $p_MESSAGE))" >
<FUNCTION_CALL name="print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="\[Batch:" datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$l_batch_id" />
</CONCAT>
<CONSTANT value="\] \[Proc:" datatype="VARCHAR" size="10" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_process_id" />
</CONCAT>
<CONSTANT value="\] \[Detail:" datatype="VARCHAR" size="12" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_stepdetail_id" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_MESSAGE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print(((((('\\[Batch:' || $l_batch_id) || '\\] \\[Proc:') || $l_process_id) || '\\] ') || $p_MESSAGE))" >
<FUNCTION_CALL name="print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="\[Batch:" datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$l_batch_id" />
</CONCAT>
<CONSTANT value="\] \[Proc:" datatype="VARCHAR" size="10" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_process_id" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_MESSAGE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="M_ICPS_GET_MAX_WF_PROCESS_ID" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function returns the max process id for a given workflow&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;if ($P_BATCH_ID &gt; 0 )&#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;$L_SQL = 'SELECT MAX (sd.MD_PROCESS_ID) FROM dwabc.JOB_STREAM_STEP_DETAIL_RT sd where sd.DETAIL_NAME = \''||$P_WF_NAME||'\' and sd.MD_PROCESS_ID in  (SELECT MD_PROCESS_ID FROM dwabc.JOB_STREAM_STEP_RT s WHERE s.MD_BATCH_ID='||$P_BATCH_ID ||' and s.JOB_NAME = \''||$P_JOB_NAME ||'\' )  ';&#xA;&#x9;&#x9;$L_LAST_ProcessID  = sql('DW_ABC_DS',$L_SQL);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;# RETURN VALUE&#xD;&#xA;return   $L_LAST_ProcessID;&#xD;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="this function takes last status per batch over WF"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_BATCH_ID" datatype="INT" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_JOB_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_LAST_ProcessID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_SQL" datatype="VARCHAR" size="600" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($P_BATCH_ID &gt; 0)" >
<LOGICAL_OP op="GT">
<VARIABLE_REFERENCE name="$P_BATCH_ID" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_SQL" >
<DIExpression isString="true" expr="(((((('SELECT MAX (sd.MD_PROCESS_ID) FROM dwabc.JOB_STREAM_STEP_DETAIL_RT sd where sd.DETAIL_NAME = \'' || $P_WF_NAME) || '\' and sd.MD_PROCESS_ID in  (SELECT MD_PROCESS_ID FROM dwabc.JOB_STREAM_STEP_RT s WHERE s.MD_BATCH_ID=') || $P_BATCH_ID) || ' and s.JOB_NAME = \'') || $P_JOB_NAME) || '\' )  ')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="SELECT MAX (sd.MD_PROCESS_ID) FROM dwabc.JOB_STREAM_STEP_DETAIL_RT sd where sd.DETAIL_NAME = '" datatype="VARCHAR" size="94" />
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</CONCAT>
<CONSTANT value="' and sd.MD_PROCESS_ID in  (SELECT MD_PROCESS_ID FROM dwabc.JOB_STREAM_STEP_RT s WHERE s.MD_BATCH_ID=" datatype="VARCHAR" size="101" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_BATCH_ID" />
</CONCAT>
<CONSTANT value=" and s.JOB_NAME = '" datatype="VARCHAR" size="19" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_JOB_NAME" />
</CONCAT>
<CONSTANT value="' )  " datatype="VARCHAR" size="5" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LAST_ProcessID" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', $L_SQL)" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<VARIABLE_REFERENCE name="$L_SQL" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_LAST_ProcessID" >
<VARIABLE_REFERENCE name="$L_LAST_ProcessID" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="M_ICPS_GET_WF_STATUS" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function takes last status for run extract batch&#xD;&#xA;&#xD;&#xA;if ($P_MAX_PROCESS_ID is not null)&#xD;&#xA;begin&#xA;&#x9;$L_SQL = 'select status from dwabc.JOB_STREAM_STEP_DETAIL_RT where MD_PROCESS_ID = {$P_MAX_PROCESS_ID} and  DETAIL_NAME = {$L_WF_NAME}';&#xA;&#x9;$L_LAST_STATUS  = sql('DW_ABC_DS',$L_SQL);&#x9;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xA;&#x9;$L_LAST_STATUS=null;&#xA;end&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# return value&#xD;&#xA;return   $L_LAST_STATUS;&#xD;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="this function takes last status per batch over WF"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_MAX_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_LAST_STATUS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_SQL" datatype="VARCHAR" size="600" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($P_MAX_PROCESS_ID IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$P_MAX_PROCESS_ID" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_SQL" >
<DIExpression isString="true" expr="'select status from dwabc.JOB_STREAM_STEP_DETAIL_RT where MD_PROCESS_ID = {$P_MAX_PROCESS_ID} and  DETAIL_NAME = {$L_WF_NAME}'" >
<CONSTANT value="select status from dwabc.JOB_STREAM_STEP_DETAIL_RT where MD_PROCESS_ID = {$P_MAX_PROCESS_ID} and  DETAIL_NAME = {$L_WF_NAME}" datatype="VARCHAR" size="124" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LAST_STATUS" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', $L_SQL)" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<VARIABLE_REFERENCE name="$L_SQL" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$L_LAST_STATUS" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_LAST_STATUS" >
<VARIABLE_REFERENCE name="$L_LAST_STATUS" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="XREF_COUNT_SOURCE_INSTANCES_PER_CONS_ENTITY" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="$L_COUNT = sql('DW_METADATA_DS','SELECT COUNT(*) from &#xD;&#xA;(SELECT ROW_NUMBER() OVER (ORDER BY CP_ID ASC) AS ROWID ,CP_ID FROM dwmetadata.ExtractionModel e &#xD;&#xA;inner join  dwmetadata.ExtractionConsRef ec&#xD;&#xA;on ec.extraction_hjid = e.Hjid &#xD;&#xA;inner join dwmetadata.CONTENT_PACK cp&#xD;&#xA;on cp.NAME = Productname&#xD;&#xA;and cp.STATE=\'Activated\'&#xD;&#xA;where   ec.Consolidationidentifier = \''||$P_ENTITY|| '\'   &#xD;&#xA;group by CP_ID) inner_table');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Return $L_COUNT  ;&#xD;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_ENTITY" datatype="VARCHAR" size="25" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_COUNT" datatype="INT" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_COUNT" >
<DIExpression isString="true" expr="sql('DW_METADATA_DS', (('SELECT COUNT(*) from &#xD;&#xA;(SELECT ROW_NUMBER() OVER (ORDER BY CP_ID ASC) AS ROWID ,CP_ID FROM dwmetadata.ExtractionModel e &#xD;&#xA;inner join  dwmetadata.ExtractionConsRef ec&#xD;&#xA;on ec.extraction_hjid = e.Hjid &#xD;&#xA;inner join dwmetadata.CONTENT_PACK cp&#xD;&#xA;on cp.NAME = Productname&#xD;&#xA;and cp.STATE=\'Activated\'&#xD;&#xA;where   ec.Consolidationidentifier = \'' || $P_ENTITY) || '\'   &#xD;&#xA;group by CP_ID) inner_table'))" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_METADATA_DS" datatype="VARCHAR" size="14" />
<CONCAT>
<CONCAT>
<CONSTANT value="SELECT COUNT(*) from &#xD;&#xA;(SELECT ROW_NUMBER() OVER (ORDER BY CP_ID ASC) AS ROWID ,CP_ID FROM dwmetadata.ExtractionModel e &#xD;&#xA;inner join  dwmetadata.ExtractionConsRef ec&#xD;&#xA;on ec.extraction_hjid = e.Hjid &#xD;&#xA;inner join dwmetadata.CONTENT_PACK cp&#xD;&#xA;on cp.NAME = Productname&#xD;&#xA;and cp.STATE='Activated'&#xD;&#xA;where   ec.Consolidationidentifier = '" datatype="VARCHAR" size="329" />
<VARIABLE_REFERENCE name="$P_ENTITY" />
</CONCAT>
<CONSTANT value="'   &#xD;&#xA;group by CP_ID) inner_table" datatype="VARCHAR" size="33" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_COUNT" >
<VARIABLE_REFERENCE name="$L_COUNT" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="XREF_GET_CP_ID_OF_CONS_ENTITY_BY_PRIORITY" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="$L_CP_ID = sql('DW_METADATA_DS',&#xD;&#xA;'SELECT CP_ID&#xD;&#xA;FROM   (SELECT Row_number() OVER (ORDER BY PRIORITY DESC, Hjid  desc) AS ROWID,&#xD;&#xA;               PRIORITY,&#xD;&#xA;               CP_ID &#xD;&#xA;        FROM   (SELECT DISTINCT cp.CP_ID,&#xD;&#xA;                                CASE&#xD;&#xA;                                  WHEN Isnull(ce.PRIORITY, -1) = 0 &#xD;&#xA;                                THEN Isnull(pr.PRIORITY, dsc.Hjid + Isnull(MAX_PRIORITY, 0)) &#xD;&#xA;                                  ELSE -1&#xD;&#xA;                                END AS PRIORITY ,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;    dsc.Hjid                 &#xD;&#xA;                FROM   dwmetadata.ExtractionModel e&#xD;&#xA;                       INNER JOIN dwmetadata.ExtractionConsRef ec&#xD;&#xA;                         ON ec.extraction_hjid = e.Hjid&#xD;&#xA;                       INNER JOIN dwmetadata.CONTENT_PACK cp&#xD;&#xA;                         ON cp.NAME = Productname&#xD;&#xA;                            AND cp.STATE = \'Activated\'&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities ce &#xD;&#xA;                         ON ce.MD_CP_ID = 0&#xD;&#xA;                            AND ec.Consolidationidentifier = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities pr &#xD;&#xA;                         ON pr.MD_CP_ID = cp.CP_ID&#xD;&#xA;                            AND pr.DWID = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.DataSourceConnection dsc &#xD;&#xA;                         ON dsc.CP_ID = cp.CP_ID&#xD;&#xA;                       LEFT OUTER JOIN (SELECT Max(PRIORITY) AS MAX_PRIORITY &#xD;&#xA;                                        FROM   dwmetadata.ConsolidationPriorities pr2&#xD;&#xA;                                        WHERE  pr2.DWID = \''||$P_ENTITY|| '\') a&#xD;&#xA;                         ON 1 = 1&#xD;&#xA;                WHERE  ec.Consolidationidentifier = \''||$P_ENTITY|| '\') CALC_PRIORITY) ORDER_BY_PRIORITY_DESC&#xD;&#xA;WHERE  ROWID = '||$ROW_NUM&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Return $L_CP_ID ;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_ENTITY" datatype="VARCHAR" size="25" >
</DIElement>
<DIElement paramType="IN" name="$ROW_NUM" datatype="INT" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_CP_ID" datatype="INT" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_CP_ID" >
<DIExpression isString="true" expr="sql('DW_METADATA_DS', ((((('SELECT CP_ID&#xD;&#xA;FROM   (SELECT Row_number() OVER (ORDER BY PRIORITY DESC, Hjid  desc) AS ROWID,&#xD;&#xA;               PRIORITY,&#xD;&#xA;               CP_ID &#xD;&#xA;        FROM   (SELECT DISTINCT cp.CP_ID,&#xD;&#xA;                                CASE&#xD;&#xA;                                  WHEN Isnull(ce.PRIORITY, -1) = 0 &#xD;&#xA;                                THEN Isnull(pr.PRIORITY, dsc.Hjid + Isnull(MAX_PRIORITY, 0)) &#xD;&#xA;                                  ELSE -1&#xD;&#xA;                                END AS PRIORITY ,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;    dsc.Hjid                 &#xD;&#xA;                FROM   dwmetadata.ExtractionModel e&#xD;&#xA;                       INNER JOIN dwmetadata.ExtractionConsRef ec&#xD;&#xA;                         ON ec.extraction_hjid = e.Hjid&#xD;&#xA;                       INNER JOIN dwmetadata.CONTENT_PACK cp&#xD;&#xA;                         ON cp.NAME = Productname&#xD;&#xA;                            AND cp.STATE = \'Activated\'&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities ce &#xD;&#xA;                         ON ce.MD_CP_ID = 0&#xD;&#xA;                            AND ec.Consolidationidentifier = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities pr &#xD;&#xA;                         ON pr.MD_CP_ID = cp.CP_ID&#xD;&#xA;                            AND pr.DWID = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.DataSourceConnection dsc &#xD;&#xA;                         ON dsc.CP_ID = cp.CP_ID&#xD;&#xA;                       LEFT OUTER JOIN (SELECT Max(PRIORITY) AS MAX_PRIORITY &#xD;&#xA;                                        FROM   dwmetadata.ConsolidationPriorities pr2&#xD;&#xA;                                        WHERE  pr2.DWID = \'' || $P_ENTITY) || '\') a&#xD;&#xA;                         ON 1 = 1&#xD;&#xA;                WHERE  ec.Consolidationidentifier = \'') || $P_ENTITY) || '\') CALC_PRIORITY) ORDER_BY_PRIORITY_DESC&#xD;&#xA;WHERE  ROWID = ') || $ROW_NUM))" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_METADATA_DS" datatype="VARCHAR" size="14" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="SELECT CP_ID&#xD;&#xA;FROM   (SELECT Row_number() OVER (ORDER BY PRIORITY DESC, Hjid  desc) AS ROWID,&#xD;&#xA;               PRIORITY,&#xD;&#xA;               CP_ID &#xD;&#xA;        FROM   (SELECT DISTINCT cp.CP_ID,&#xD;&#xA;                                CASE&#xD;&#xA;                                  WHEN Isnull(ce.PRIORITY, -1) = 0 &#xD;&#xA;                                THEN Isnull(pr.PRIORITY, dsc.Hjid + Isnull(MAX_PRIORITY, 0)) &#xD;&#xA;                                  ELSE -1&#xD;&#xA;                                END AS PRIORITY ,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;    dsc.Hjid                 &#xD;&#xA;                FROM   dwmetadata.ExtractionModel e&#xD;&#xA;                       INNER JOIN dwmetadata.ExtractionConsRef ec&#xD;&#xA;                         ON ec.extraction_hjid = e.Hjid&#xD;&#xA;                       INNER JOIN dwmetadata.CONTENT_PACK cp&#xD;&#xA;                         ON cp.NAME = Productname&#xD;&#xA;                            AND cp.STATE = 'Activated'&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities ce &#xD;&#xA;                         ON ce.MD_CP_ID = 0&#xD;&#xA;                            AND ec.Consolidationidentifier = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities pr &#xD;&#xA;                         ON pr.MD_CP_ID = cp.CP_ID&#xD;&#xA;                            AND pr.DWID = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.DataSourceConnection dsc &#xD;&#xA;                         ON dsc.CP_ID = cp.CP_ID&#xD;&#xA;                       LEFT OUTER JOIN (SELECT Max(PRIORITY) AS MAX_PRIORITY &#xD;&#xA;                                        FROM   dwmetadata.ConsolidationPriorities pr2&#xD;&#xA;                                        WHERE  pr2.DWID = '" datatype="VARCHAR" size="1595" />
<VARIABLE_REFERENCE name="$P_ENTITY" />
</CONCAT>
<CONSTANT value="') a&#xD;&#xA;                         ON 1 = 1&#xD;&#xA;                WHERE  ec.Consolidationidentifier = '" datatype="VARCHAR" size="94" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_ENTITY" />
</CONCAT>
<CONSTANT value="') CALC_PRIORITY) ORDER_BY_PRIORITY_DESC&#xD;&#xA;WHERE  ROWID = " datatype="VARCHAR" size="57" />
</CONCAT>
<VARIABLE_REFERENCE name="$ROW_NUM" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_CP_ID" >
<VARIABLE_REFERENCE name="$L_CP_ID" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="XREF_GET_SOURCE_PRIORITY" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#XREF_GET_SOURCE_PRIORITY FUNCTION&#xD;&#xA;&#xD;&#xA;$L_PRIORITY = sql('DW_METADATA_DS',&#xD;&#xA;'SELECT PRIORITY&#xD;&#xA;        FROM   (SELECT DISTINCT cp.CP_ID,&#xD;&#xA;                                CASE&#xD;&#xA;                                  WHEN Isnull(ce.PRIORITY, -1) = 0 &#xD;&#xA;                                THEN Isnull(pr.PRIORITY, dsc.Hjid + Isnull(MAX_PRIORITY, 0)) &#xD;&#xA;                                  ELSE -1&#xD;&#xA;                                END AS PRIORITY &#xD;&#xA;                FROM   dwmetadata.ExtractionModel e&#xD;&#xA;                       INNER JOIN dwmetadata.ExtractionConsRef ec&#xD;&#xA;                         ON ec.extraction_hjid = e.Hjid&#xD;&#xA;                       INNER JOIN dwmetadata.CONTENT_PACK cp&#xD;&#xA;                         ON cp.NAME = Productname&#xD;&#xA;                            AND cp.STATE = \'Activated\'&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities ce &#xD;&#xA;                         ON ce.MD_CP_ID = 0&#xD;&#xA;                            AND ec.Consolidationidentifier = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities pr &#xD;&#xA;                         ON pr.MD_CP_ID = cp.CP_ID&#xD;&#xA;                            AND pr.DWID = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.DataSourceConnection dsc &#xD;&#xA;                         ON dsc.CP_ID = cp.CP_ID&#xD;&#xA;                       LEFT OUTER JOIN (SELECT Max(PRIORITY) AS MAX_PRIORITY &#xD;&#xA;                                        FROM   dwmetadata.ConsolidationPriorities pr2&#xD;&#xA;                                        WHERE  pr2.DWID = \''||$P_ENTITY|| '\') a&#xD;&#xA;                         ON 1 = 1&#xD;&#xA;                WHERE  ec.Consolidationidentifier = \''||$P_ENTITY|| '\') CALC_PRIORITY&#xD;&#xA;WHERE CP_ID='||$P_CP_ID);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Return $L_PRIORITY ;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_ENTITY" datatype="VARCHAR" size="25" >
</DIElement>
<DIElement paramType="IN" name="$P_CP_ID" datatype="INT" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_PRIORITY" datatype="INT" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_PRIORITY" >
<DIExpression isString="true" expr="sql('DW_METADATA_DS', ((((('SELECT PRIORITY&#xD;&#xA;        FROM   (SELECT DISTINCT cp.CP_ID,&#xD;&#xA;                                CASE&#xD;&#xA;                                  WHEN Isnull(ce.PRIORITY, -1) = 0 &#xD;&#xA;                                THEN Isnull(pr.PRIORITY, dsc.Hjid + Isnull(MAX_PRIORITY, 0)) &#xD;&#xA;                                  ELSE -1&#xD;&#xA;                                END AS PRIORITY &#xD;&#xA;                FROM   dwmetadata.ExtractionModel e&#xD;&#xA;                       INNER JOIN dwmetadata.ExtractionConsRef ec&#xD;&#xA;                         ON ec.extraction_hjid = e.Hjid&#xD;&#xA;                       INNER JOIN dwmetadata.CONTENT_PACK cp&#xD;&#xA;                         ON cp.NAME = Productname&#xD;&#xA;                            AND cp.STATE = \'Activated\'&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities ce &#xD;&#xA;                         ON ce.MD_CP_ID = 0&#xD;&#xA;                            AND ec.Consolidationidentifier = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities pr &#xD;&#xA;                         ON pr.MD_CP_ID = cp.CP_ID&#xD;&#xA;                            AND pr.DWID = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.DataSourceConnection dsc &#xD;&#xA;                         ON dsc.CP_ID = cp.CP_ID&#xD;&#xA;                       LEFT OUTER JOIN (SELECT Max(PRIORITY) AS MAX_PRIORITY &#xD;&#xA;                                        FROM   dwmetadata.ConsolidationPriorities pr2&#xD;&#xA;                                        WHERE  pr2.DWID = \'' || $P_ENTITY) || '\') a&#xD;&#xA;                         ON 1 = 1&#xD;&#xA;                WHERE  ec.Consolidationidentifier = \'') || $P_ENTITY) || '\') CALC_PRIORITY&#xD;&#xA;WHERE CP_ID=') || $P_CP_ID))" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_METADATA_DS" datatype="VARCHAR" size="14" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="SELECT PRIORITY&#xD;&#xA;        FROM   (SELECT DISTINCT cp.CP_ID,&#xD;&#xA;                                CASE&#xD;&#xA;                                  WHEN Isnull(ce.PRIORITY, -1) = 0 &#xD;&#xA;                                THEN Isnull(pr.PRIORITY, dsc.Hjid + Isnull(MAX_PRIORITY, 0)) &#xD;&#xA;                                  ELSE -1&#xD;&#xA;                                END AS PRIORITY &#xD;&#xA;                FROM   dwmetadata.ExtractionModel e&#xD;&#xA;                       INNER JOIN dwmetadata.ExtractionConsRef ec&#xD;&#xA;                         ON ec.extraction_hjid = e.Hjid&#xD;&#xA;                       INNER JOIN dwmetadata.CONTENT_PACK cp&#xD;&#xA;                         ON cp.NAME = Productname&#xD;&#xA;                            AND cp.STATE = 'Activated'&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities ce &#xD;&#xA;                         ON ce.MD_CP_ID = 0&#xD;&#xA;                            AND ec.Consolidationidentifier = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.ConsolidationPriorities pr &#xD;&#xA;                         ON pr.MD_CP_ID = cp.CP_ID&#xD;&#xA;                            AND pr.DWID = ce.DWID&#xD;&#xA;                       LEFT OUTER JOIN dwmetadata.DataSourceConnection dsc &#xD;&#xA;                         ON dsc.CP_ID = cp.CP_ID&#xD;&#xA;                       LEFT OUTER JOIN (SELECT Max(PRIORITY) AS MAX_PRIORITY &#xD;&#xA;                                        FROM   dwmetadata.ConsolidationPriorities pr2&#xD;&#xA;                                        WHERE  pr2.DWID = '" datatype="VARCHAR" size="1429" />
<VARIABLE_REFERENCE name="$P_ENTITY" />
</CONCAT>
<CONSTANT value="') a&#xD;&#xA;                         ON 1 = 1&#xD;&#xA;                WHERE  ec.Consolidationidentifier = '" datatype="VARCHAR" size="94" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_ENTITY" />
</CONCAT>
<CONSTANT value="') CALC_PRIORITY&#xD;&#xA;WHERE CP_ID=" datatype="VARCHAR" size="30" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_CP_ID" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_PRIORITY" >
<VARIABLE_REFERENCE name="$L_PRIORITY" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIJob name="DW_PRIORITY_JB" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="DW_JB (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:25"/>
<DIAttribute name="Description" value="The BO DS job DW_JB is responsible for loading the {TARGET DIMENSION}_DIM and {TARGET DIMENSION}_FACT tables.  These tables are dimension and fact target tables that will be used for reporting purposes.  Data is sourced from the XFR tables and loaded into the appropriate DIM and FACT tables."/>
<DIAttribute name="Web_Service_Enabled" value="YES"/>
</DIProperties>
<DIVariables>
<DIElement paramType="GLOBAL" name="$G_DEBUG_MODE" datatype="INT" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_TRACE_MODE" datatype="INT" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_PERIOD_ID" datatype="INT" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_AM_FILELOCATION" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_ALT_FILELOCATION" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_PPM_FILELOCATION" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_EXTN_FILELOCATION" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_FLAG_NEW" datatype="VARCHAR" size="6" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_FLAG_DELETE" datatype="VARCHAR" size="6" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_FLAG_UPDATE" datatype="VARCHAR" size="6" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_MODDATE_LOC" datatype="DATETIME" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_MD_NON_PREFILL_FLAG" datatype="VARCHAR" size="1" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_MD_FROM_PREFILL_FLAG" datatype="VARCHAR" size="1" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_ENABLE_VAL" datatype="VARCHAR" size="4" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_CONTENT_PACK_ID" datatype="INT" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_PRODUCT_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="ui_display_name" value="DW_PRIORITY_JB_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="STARTJB_SC is used to set global variables and initiates the metadata tracking for the Job"/>
<DIAttribute name="ui_display_name" value="STARTJB_SC"/>
<DIAttribute name="ui_script_text" value="#ABC_STARTJB_FN($G_PROCESS_ID, $G_DEBUG_MODE, $G_BATCH_ID);&#xD;&#xA;&#xD;&#xA;$G_ALT_FILELOCATION = lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [ NULL ], [ SOURCE, '=', 'ALT' ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no');&#xD;&#xA;&#xD;&#xA;$G_EXTN_FILELOCATION = lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [ NULL ], [ SOURCE, '=', 'EXTERNAL' ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no');&#xD;&#xA;&#xD;&#xA;$G_AM_FILELOCATION = lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [ NULL ], [ SOURCE, '=', 'AM' ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no');&#xD;&#xA;&#xD;&#xA;$G_PPM_FILELOCATION = lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [ NULL ], [ SOURCE, '=', 'PPM' ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no');&#xD;&#xA;&#xD;&#xA;$G_CONTENT_PACK_ID = sql('DW_METADATA_DS','SELECT CP_ID FROM CONTENT_PACK WHERE NAME = \'ALT\'');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ABC_STARTJB_FN($G_PROCESS_ID, $G_DEBUG_MODE, $G_BATCH_ID);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ETL_PRINT('****************************************************************************************************************');&#xD;&#xA;ETL_PRINT(' ');&#xD;&#xA;ETL_PRINT('Source Extract Flat Files are located in the '||$G_ALT_FILELOCATION||' directory.' );&#xD;&#xA;ETL_PRINT(' ');&#xD;&#xA;ETL_PRINT('****************************************************************************************************************');&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$G_ALT_FILELOCATION" >
<DIExpression isString="true" expr="lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [  NULL  ], [ SOURCE, '=', 'ALT' ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_METADATA_DS" tableOwner="DW_METADATA_ALIAS" tableName="FILE_LOCATION_INFO" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<CONSTANT value="ALT" datatype="VARCHAR" size="3" />
<CONSTANT_NULL /><DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_EXTN_FILELOCATION" >
<DIExpression isString="true" expr="lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [  NULL  ], [ SOURCE, '=', 'EXTERNAL' ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_METADATA_DS" tableOwner="DW_METADATA_ALIAS" tableName="FILE_LOCATION_INFO" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<CONSTANT value="EXTERNAL" datatype="VARCHAR" size="8" />
<CONSTANT_NULL /><DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_AM_FILELOCATION" >
<DIExpression isString="true" expr="lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [  NULL  ], [ SOURCE, '=', 'AM' ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_METADATA_DS" tableOwner="DW_METADATA_ALIAS" tableName="FILE_LOCATION_INFO" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<CONSTANT value="AM" datatype="VARCHAR" size="2" />
<CONSTANT_NULL /><DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_PPM_FILELOCATION" >
<DIExpression isString="true" expr="lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [  NULL  ], [ SOURCE, '=', 'PPM' ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_METADATA_DS" tableOwner="DW_METADATA_ALIAS" tableName="FILE_LOCATION_INFO" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<CONSTANT value="PPM" datatype="VARCHAR" size="3" />
<CONSTANT_NULL /><DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_CONTENT_PACK_ID" >
<DIExpression isString="true" expr="sql('DW_METADATA_DS', 'SELECT CP_ID FROM CONTENT_PACK WHERE NAME = \'ALT\'')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_METADATA_DS" datatype="VARCHAR" size="14" />
<CONSTANT value="SELECT CP_ID FROM CONTENT_PACK WHERE NAME = 'ALT'" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startjb_fn($G_PROCESS_ID, $G_DEBUG_MODE, $G_BATCH_ID)" >
<FUNCTION_CALL name="abc_startjb_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$G_DEBUG_MODE" />
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('****************************************************************************************************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="****************************************************************************************************************" datatype="VARCHAR" size="112" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(' ')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value=" " datatype="VARCHAR" size="1" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('Source Extract Flat Files are located in the ' || $G_ALT_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="Source Extract Flat Files are located in the " datatype="VARCHAR" size="45" />
<VARIABLE_REFERENCE name="$G_ALT_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(' ')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value=" " datatype="VARCHAR" size="1" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('****************************************************************************************************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="****************************************************************************************************************" datatype="VARCHAR" size="112" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_CONTAINER_WF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="ENDJB_SC concludes the metadata for the Job and Adds final Entries into the ABC Tracking system"/>
<DIAttribute name="ui_display_name" value="ENDJB_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDJB_FN($G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endjb_fn($G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endjb_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="ui_display_name" value="DW_PRIORITY_JB_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="DW_JB_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILJB_FN($G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failjb_fn($G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failjb_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="job_GV_$G_ENABLE_VAL" value="'SOME'"/>
<DIAttribute name="job_GV_$G_FLAG_DELETE" value="'DEL'"/>
<DIAttribute name="job_GV_$G_FLAG_NEW" value="'NEW'"/>
<DIAttribute name="job_GV_$G_FLAG_UPDATE" value="'UPD'"/>
<DIAttribute name="job_GV_$G_MD_FROM_PREFILL_FLAG" value="'P'"/>
<DIAttribute name="job_GV_$G_MD_NON_PREFILL_FLAG" value="'D'"/>
<DIAttribute name="job_GV_$G_MODDATE_LOC" value="sysdate()"/>
<DIAttribute name="job_checkpoint_enabled" value="no"/>
<DIAttribute name="job_collect_statistics" value="no"/>
<DIAttribute name="job_collect_statistics_monitor" value="no"/>
<DIAttribute name="job_enable_assemblers" value="yes"/>
<DIAttribute name="job_enable_audit" value="yes"/>
<DIAttribute name="job_enable_dataquality" value="yes"/>
<DIAttribute name="job_export_repo" value="no"/>
<DIAttribute name="job_export_reports" value="no"/>
<DIAttribute name="job_isrecoverable" value="no"/>
<DIAttribute name="job_mode" value="Multi-Process"/>
<DIAttribute name="job_monitor_sample_rate" value="1000"/>
<DIAttribute name="job_name" value="DW_PRIORITY_JB"/>
<DIAttribute name="job_print_version" value="no"/>
<DIAttribute name="job_testmode_enabled" value="no"/>
<DIAttribute name="job_trace_abapquery" value="no"/>
<DIAttribute name="job_trace_all" value="no"/>
<DIAttribute name="job_trace_ascomm" value="no"/>
<DIAttribute name="job_trace_assemblers" value="no"/>
<DIAttribute name="job_trace_audit" value="no"/>
<DIAttribute name="job_trace_dataflow" value="yes"/>
<DIAttribute name="job_trace_idoc_file" value="no"/>
<DIAttribute name="job_trace_memory_loader" value="no"/>
<DIAttribute name="job_trace_memory_reader" value="no"/>
<DIAttribute name="job_trace_optimized_dataflow" value="no"/>
<DIAttribute name="job_trace_parallel_execution" value="no"/>
<DIAttribute name="job_trace_rfc_function" value="no"/>
<DIAttribute name="job_trace_row" value="no"/>
<DIAttribute name="job_trace_script" value="no"/>
<DIAttribute name="job_trace_session" value="yes"/>
<DIAttribute name="job_trace_sql_only" value="no"/>
<DIAttribute name="job_trace_sqlfunctions" value="no"/>
<DIAttribute name="job_trace_sqlloaders" value="no"/>
<DIAttribute name="job_trace_sqlreaders" value="no"/>
<DIAttribute name="job_trace_sqltransforms" value="no"/>
<DIAttribute name="job_trace_stored_procedure" value="no"/>
<DIAttribute name="job_trace_table" value="no"/>
<DIAttribute name="job_trace_table_reader" value="no"/>
<DIAttribute name="job_trace_transform" value="no"/>
<DIAttribute name="job_trace_userfunction" value="no"/>
<DIAttribute name="job_trace_usertransform" value="no"/>
<DIAttribute name="job_trace_workflow" value="yes"/>
<DIAttribute name="job_type" value="batch"/>
<DIAttribute name="job_use_statistics" value="yes"/>
<DIAttribute name="locale_codepage" value="&lt;default&gt;"/>
<DIAttribute name="locale_language" value="&lt;default&gt;"/>
<DIAttribute name="locale_territory" value="&lt;default&gt;"/>
</DIAttributes>
</DIJob>
<DIWorkflow name="DW_PRIORITY_CONTAINER_WF" typeId="2" >
<DIProperties>
<DIAttribute name="Description" value="This Workflow was created in order to house the parent workflows that will load the target dimension and target fact tables"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_CUSTOM_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_GEN_CONT_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="DW_PRIORITY_CUSTOM_CONT_WF" typeId="2" >
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="DW_PRIORITY_GEN_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities that must run completely before the main set of entities can begin."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;#__INTEGRATED_ENTITIES&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_SOURCE_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_EXT_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_SSI_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_MSI_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_MSC_STG_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_CON_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_DIM_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_LOOKUP_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_XFR_UPDATE_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_DW_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_CSNP_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_TSNP_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="DW_PRIORITY_SSNP_CONT_WF" >
</DICallStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="DW_PRIORITY_SOURCE_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;#__INTEGRATED_ENTITIES&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="DW_PRIORITY_EXT_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;#__INTEGRATED_ENTITIES&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="DW_PRIORITY_SSI_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;#__INTEGRATED_ENTITIES&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="DW_PRIORITY_MSI_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_MSI_WF" >
</DICallStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_MSI_WF" typeId="2" >
<DIProperties>
<DIAttribute name="Description" value="This workflow assigns ENTERPRISE_KEYS to all BUSINESS_KEYS."/>
</DIProperties>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSI_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSI_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;# DETERMINE THE XREF_IDS FOR THE SOURCE TABLE NAME&#xD;&#xA;# THESE VALUES WILL BE USED TO FIND THE ASSOCIATED ENTERPRISE KEY &#xD;&#xA;# IN THE {ENTITY}_XREF TABLE &#xD;&#xA;&#xD;&#xA;#$L_SOURCE_ENTITY = 'AM_EXCHANGE';&#xD;&#xA;#GET_SOURCE_XREF_ID_FN($L_SOURCE_ENTITY, $L_SOURCE_XREF_ID);&#xD;&#xA;&#xD;&#xA;# DETERMINE THE XREF_IDS FOR THE FOR ORG ENTITY&#xD;&#xA;&#xD;&#xA;#$L_ORG_SOURCE_ENTITY = 'AM_ORG';&#xD;&#xA;#GET_SOURCE_XREF_ID_FN($L_ORG_SOURCE_ENTITY, $L_ORG_SOURCE_XREF_ID);&#xD;&#xA;&#xD;&#xA;# DETERMINE THE XREF_IDS FOR THE LOCATION ENTITY&#xD;&#xA;&#xD;&#xA;#$L_LOC_SOURCE_ENTITY = 'AM_LOCATION';&#xD;&#xA;#GET_SOURCE_XREF_ID_FN($L_LOC_SOURCE_ENTITY, $L_LOC_SOURCE_XREF_ID);"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_MSI_DF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object that calls the custom end workflow function.  This script closes the metadata records that are part of this process."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSI_END_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK END OF WORKFLOW&#xD;&#xA;ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSI_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflows."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSI_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_MSI_DF" typeId="1" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This dataflow performs a lookup of the ENTERPRISE_KEY for the incoming record and also finds the ENTERPRISE_KEY for any BUSINESS_KEY fields."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="The dataflow that sources data from the SSI table, does a lookup and sets the appropriate ENTERPRISE_KEY from the {ENTITY}_ENTERPRISE_XREF table using the incoming SSI business key, and the SOURCE_XREF_ID values that were found in the start script."/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Lookup the ENTERPRISE_KEY in the {ENTITY}_ENTERPRISE_XREF table using the BUSINESS_KEY and SOURCE_XREF_ID values that were found in the start script. Perform the lookup for the source MD_BUSINESS_KEY and for all foreign business keys. Also set the MD PROCESS ID and MD BATCH ID values."/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_SSI_V"/>
<DIAttribute name="ui_display_name" value="QRY_ENTERPRISE_KEY"/>
</DIUIOptions>
<DISchema name="QRY_ENTERPRISE_KEY" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.MD_BUSINESS_KEY&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_ENTERPRISE_XREF, 'PRE_LOAD_CACHE', 'MAX'], [ ENTERPRISE_KEY ], [ -2 ], [ BUSINESS_KEYVALUE, '=', EXCHANGE_SSI_V.MD_BUSINESS_KEY, MD_CP_ID, '=', EXCHANGE_SSI_V.MD_CP_ID ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.MD_FLAG&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CP_ID" datatype="INT" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.MD_CP_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_QUALIFIER" datatype="VARCHAR" size="200" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.MD_QUALIFIER"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_SSI_V.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_ENTERPRISE_XREF, 'PRE_LOAD_CACHE', 'MAX'], [ ENTERPRISE_KEY ], [ -2 ], [ BUSINESS_KEYVALUE, '=', EXCHANGE_SSI_V.MD_BUSINESS_KEY, MD_CP_ID, '=', EXCHANGE_SSI_V.MD_CP_ID ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_ENTERPRISE_XREF" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="MD_BUSINESS_KEY" />
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="MD_CP_ID" />
<CONSTANT value="-2" datatype="INT" />
<DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.MD_FLAG" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="MD_FLAG" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.MD_CP_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="MD_CP_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.MD_QUALIFIER" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="MD_QUALIFIER" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_SSI_V.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_SSI_V" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_SSI_V" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_SSI_V" >
<DIOutputView name="EXCHANGE_SSI_V"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSI" >
<DIInputView name="QRY_ENTERPRISE_KEY"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">

<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>No</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load>1</loader_bulk_load>
<loader_compare_column>Compare by name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DWSTAGING_DS_DWSTAGING_ALIAS_EXCHANGE_MSI.txt</loader_overflow_file>
<loader_post_load1></loader_post_load1>
<loader_pre_load1></loader_pre_load1>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>No</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>No</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>truncate</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>No</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_MSC_STG_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_MSC_STG_WF" >
</DICallStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_MSC_STG_WF" typeId="2" >
<DIVariables>
<DIElement paramType="LOCAL" name="$L_CONS_ENTITY" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COUNTER" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COUNT_INSTANCES" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CONTENT_PACK_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_SOURCE_INSTANCE_PRIORITY" datatype="INT" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_LOOP_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_LOOP_START_SCRIPT"/>
<DIAttribute name="ui_script_text" value="ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#TRUNCATE MSC_STG TABLE BEFORE GOING INTO THE LOOP&#xD;&#xA;sql('DWSTAGING_DS', 'TRUNCATE TABLE dwst.EXCHANGE_MSC_STG');&#xD;&#xA;&#xD;&#xA;#POPULATE CONSOLIDATION ENTITY NAME&#xD;&#xA;$L_CONS_ENTITY ='EXCHANGE';&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# INITAILIZE LOOP PARAMETERS&#xD;&#xA;$L_COUNTER =1;&#xD;&#xA;$L_COUNT_INSTANCES = XREF_COUNT_SOURCE_INSTANCES_PER_CONS_ENTITY($L_CONS_ENTITY);&#xD;&#xA;&#xD;&#xA;ETL_PRINT( '------------------------------------------------------------------------------');&#xD;&#xA;ETL_PRINT( 'START MSC_STG LOOP FOR ENTITY: '||$L_CONS_ENTITY);&#xD;&#xA;ETL_PRINT( 'COUNT OF ACTIVE INSTANCES: '  ||$L_COUNT_INSTANCES);&#xD;&#xA;ETL_PRINT( '------------------------------------------------------------------------------');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DWSTAGING_DS', 'TRUNCATE TABLE dwst.EXCHANGE_MSC_STG')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DWSTAGING_DS" datatype="VARCHAR" size="12" />
<CONSTANT value="TRUNCATE TABLE dwst.EXCHANGE_MSC_STG" datatype="VARCHAR" size="36" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_CONS_ENTITY" >
<DIExpression isString="true" expr="'EXCHANGE'" >
<CONSTANT value="EXCHANGE" datatype="VARCHAR" size="8" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COUNTER" >
<DIExpression isString="true" expr="1" >
<CONSTANT value="1" datatype="INT" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COUNT_INSTANCES" >
<DIExpression isString="true" expr="xref_count_source_instances_per_cons_entity($L_CONS_ENTITY)" >
<FUNCTION_CALL name="xref_count_source_instances_per_cons_entity"  type="DI" >
<VARIABLE_REFERENCE name="$L_CONS_ENTITY" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('------------------------------------------------------------------------------')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="------------------------------------------------------------------------------" datatype="VARCHAR" size="78" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('START MSC_STG LOOP FOR ENTITY: ' || $L_CONS_ENTITY))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="START MSC_STG LOOP FOR ENTITY: " datatype="VARCHAR" size="31" />
<VARIABLE_REFERENCE name="$L_CONS_ENTITY" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('COUNT OF ACTIVE INSTANCES: ' || $L_COUNT_INSTANCES))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="COUNT OF ACTIVE INSTANCES: " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$L_COUNT_INSTANCES" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('------------------------------------------------------------------------------')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="------------------------------------------------------------------------------" datatype="VARCHAR" size="78" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DIWhileStep typeId="10" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_LOOP"/>
</DIUIOptions>
<DIExpression isString="true" expr="($L_COUNTER &lt;= $L_COUNT_INSTANCES)" >
<LOGICAL_OP op="LE">
<VARIABLE_REFERENCE name="$L_COUNTER" />
<VARIABLE_REFERENCE name="$L_COUNT_INSTANCES" />
</LOGICAL_OP>
</DIExpression>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_START_LOOP_SC"/>
<DIAttribute name="ui_script_text" value="#ITERATE OVER THE LIST OF SOURCE INSTANCES, BY PRIORITIES (FROM LOWEST TO HIGHEST PRIORITY)&#xD;&#xA;$L_CONTENT_PACK_ID = XREF_GET_CP_ID_OF_CONS_ENTITY_BY_PRIORITY( $L_CONS_ENTITY , $L_COUNTER );&#xD;&#xA;$L_SOURCE_INSTANCE_PRIORITY=XREF_GET_SOURCE_PRIORITY($L_CONS_ENTITY,$L_CONTENT_PACK_ID );"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_CONTENT_PACK_ID" >
<DIExpression isString="true" expr="xref_get_cp_id_of_cons_entity_by_priority($L_CONS_ENTITY, $L_COUNTER)" >
<FUNCTION_CALL name="xref_get_cp_id_of_cons_entity_by_priority"  type="DI" >
<VARIABLE_REFERENCE name="$L_CONS_ENTITY" />
<VARIABLE_REFERENCE name="$L_COUNTER" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_SOURCE_INSTANCE_PRIORITY" >
<DIExpression isString="true" expr="xref_get_source_priority($L_CONS_ENTITY, $L_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="xref_get_source_priority"  type="DI" >
<VARIABLE_REFERENCE name="$L_CONS_ENTITY" />
<VARIABLE_REFERENCE name="$L_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_MSC_STG_LOOP_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$L_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$L_SOURCE_INSTANCE_PRIORITY" >
<VARIABLE_REFERENCE name="$L_SOURCE_INSTANCE_PRIORITY" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_END_LOOP_SC"/>
<DIAttribute name="ui_script_text" value="# PROMOTE THE COUNTER&#xD;&#xA;$L_COUNTER = $L_COUNTER + 1;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_COUNTER" >
<DIExpression isString="true" expr="($L_COUNTER + 1)" >
<ADD>
<VARIABLE_REFERENCE name="$L_COUNTER" />
<CONSTANT value="1" datatype="INT" />
</ADD>
</DIExpression>
</DIAssignmentStep>
</DIScript>
</DISteps>
</DIWhileStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script calls the custom function ABC_ENDWF_FN."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_LOOP_END_SCRIPT"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;ETL_PRINT( '------------------------------------------------------------------------------');&#xD;&#xA;ETL_PRINT( 'END MSC_STG LOOP FOR ENTITY: '||$L_CONS_ENTITY);&#xD;&#xA;ETL_PRINT( '------------------------------------------------------------------------------');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('------------------------------------------------------------------------------')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="------------------------------------------------------------------------------" datatype="VARCHAR" size="78" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('END MSC_STG LOOP FOR ENTITY: ' || $L_CONS_ENTITY))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="END MSC_STG LOOP FOR ENTITY: " datatype="VARCHAR" size="29" />
<VARIABLE_REFERENCE name="$L_CONS_ENTITY" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('------------------------------------------------------------------------------')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="------------------------------------------------------------------------------" datatype="VARCHAR" size="78" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="This is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script ALM_CYCLE_SOURCE_EXTRACT_FF_FAIL_SC.  This script will call the custom function that is used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_LOOP_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_MSC_STG_LOOP_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_MSC_STG_LOOP_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CONTENT_PACK_ID" datatype="INT" >
</DIElement>
<DIElement paramType="IN" name="$P_SOURCE_INSTANCE_PRIORITY" datatype="INT" >
</DIElement>
</DIParameters>
<DITransforms>
<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSI" >
<DIOutputView name="EXCHANGE_MSI"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_MSI"/>
<DIAttribute name="ui_display_name" value="QRY_MERGE"/>
<DIAttribute name="ui_where_text" value="EXCHANGE_MSI.MD_CP_ID= $P_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_MERGE" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSI.MD_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSI.MD_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSI.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.MD_FLAG, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSI.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.IS_CURRENT, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.PRIORITY, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.SOURCE_CURRENCY, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.EXCHANGE_RATE, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.END_DATE_LOC, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.END_DATE_UTC, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.START_DATE_LOC, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.START_DATE_UTC, NULL)"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSI.MD_FLAG&lt;&gt;'DEL', EXCHANGE_MSI.TARGET_CURRENCY, NULL)"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="EXCHANGE_MSI.MD_BATCH_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSI.MD_PROCESS_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSI.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.MD_FLAG,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSI.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.IS_CURRENT,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="IS_CURRENT" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.PRIORITY,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="PRIORITY" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.SOURCE_CURRENCY,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="SOURCE_CURRENCY" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.EXCHANGE_RATE,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="EXCHANGE_RATE" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.END_DATE_LOC,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="END_DATE_LOC" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.END_DATE_UTC,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="END_DATE_UTC" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.START_DATE_LOC,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="START_DATE_LOC" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.START_DATE_UTC,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="START_DATE_UTC" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSI.MD_FLAG != 'DEL'), EXCHANGE_MSI.TARGET_CURRENCY,  NULL )" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_FLAG" />
<CONSTANT value="DEL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="TARGET_CURRENCY" />
<CONSTANT_NULL /></FUNCTION_CALL>
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_MSI" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(EXCHANGE_MSI.MD_CP_ID = $P_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSI" column="MD_CP_ID" />
<VARIABLE_REFERENCE name="$P_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSC_STG" >
<DIInputView name="Case_consolidate_consolidate"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DWSTAGING_DS_DWSTAGING_ALIAS_EXCHANGE_MSC_STG.txt</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>no</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>


<!-- GUID is optional -->
<DITransformCall typeId="210" name="Case_Operation"  >
<DIUIOptions>
<DIAttribute name="Case_consolidate_consolidate" value="DEFAULT"/>
<DIAttribute name="Case_consolidate_not_consolidate" value="$P_SOURCE_INSTANCE_PRIORITY=-1"/>
<DIAttribute name="ui_acta_from_schema_0" value="QRY_MERGE"/>
<DIAttribute name="ui_display_name" value="Case_consolidate"/>
</DIUIOptions>
<DIInputView name="QRY_MERGE" />
<DISchema name="Case_consolidate" >
</DISchema>
<DICase>
<DISwitch label="not_consolidate" outputView="Case_consolidate_not_consolidate" isDefault="false">
<DIExpression isString="true" expr="($P_SOURCE_INSTANCE_PRIORITY = -1)" >
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$P_SOURCE_INSTANCE_PRIORITY" />
<CONSTANT value="-1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="consolidate" outputView="Case_consolidate_consolidate" isDefault="true">
</DISwitch>
</DICase>
<DIAttributes>
<DIAttribute name="Mutually_Exclusive" value="yes"/>
<DIAttribute name="Preserve_Expression_Order" value="no"/>
</DIAttributes>
</DITransformCall>
<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSC_STG" >
<DIInputView name="Case_consolidate_not_consolidate"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>No</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>No</loader_auto_correct>
                <loader_bulk_load>1</loader_bulk_load>
                <loader_compare_column>Compare by name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DWSTAGING_DS_DWSTAGING_ALIAS_EXCHANGE_MSC_STG.txt</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>No</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>No</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>No</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_CON_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_MS_CON_WF" >
</DICallStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_MS_CON_WF" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_CON_PRODUCT_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:25:42"/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$l_input_counter" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_input_measure_id" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_output_counter" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_output_measure_id" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_metric_id" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_status" datatype="VARCHAR" size="20" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_status_info" datatype="VARCHAR" size="255" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MS_CON_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_MS_CON_START_SC"/>
<DIAttribute name="ui_script_text" value="ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;# collect MSI_V statistics&#xD;&#xA;$l_input_counter = sql('DWSTAGING_DS',&#xD;&#xA;      'SELECT count(*)  FROM EXCHANGE_MSC_STG');&#xD;&#xA;      &#xD;&#xA;$l_input_measure_id = ABC_ADDAUDITMEASURE_FN($G_PROCESS_ID, workflow_name(), 'INPUT_CONSOLIDATED_ROWS',$l_input_counter , 'INT', 'volume check', 'number of input consolidated records');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_input_counter" >
<DIExpression isString="true" expr="sql('DWSTAGING_DS', 'SELECT count(*)  FROM EXCHANGE_MSC_STG')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DWSTAGING_DS" datatype="VARCHAR" size="12" />
<CONSTANT value="SELECT count(*)  FROM EXCHANGE_MSC_STG" datatype="VARCHAR" size="38" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_input_measure_id" >
<DIExpression isString="true" expr="abc_addauditmeasure_fn($G_PROCESS_ID, workflow_name(), 'INPUT_CONSOLIDATED_ROWS', $l_input_counter, 'INT', 'volume check', 'number of input consolidated records')" >
<FUNCTION_CALL name="abc_addauditmeasure_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<FUNCTION_CALL name="workflow_name"  type="DI" />
<CONSTANT value="INPUT_CONSOLIDATED_ROWS" datatype="VARCHAR" size="23" />
<VARIABLE_REFERENCE name="$l_input_counter" />
<CONSTANT value="INT" datatype="VARCHAR" size="3" />
<CONSTANT value="volume check" datatype="VARCHAR" size="12" />
<CONSTANT value="number of input consolidated records" datatype="VARCHAR" size="36" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_MS_CON_DF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_MS_CON_END_SC"/>
<DIAttribute name="ui_script_text" value="# collect MSC statistics&#xD;&#xA;$l_output_counter = sql('DWSTAGING_DS',&#xD;&#xA;      'SELECT count(*) FROM EXCHANGE_MSC');&#xD;&#xA;      &#xD;&#xA;$l_output_measure_id = ABC_ADDAUDITMEASURE_FN($G_PROCESS_ID, workflow_name(), 'OUTPUT_CONSOLIDATED_ROWS',$l_output_counter , 'INT', 'volume check', 'number of output consolidated records');&#xD;&#xA; &#xD;&#xA;# create a metric&#xD;&#xA;if ( $l_input_counter &lt;&gt; $l_output_counter )&#xD;&#xA;  begin&#xD;&#xA;&#x9;$l_status = 'WARNING';&#x9;&#xD;&#xA;&#x9;$l_status_info = 'Check the consolidation WF structure, check the DI logs for in memory errors and contact the support';&#xD;&#xA;  end&#xD;&#xA;else &#xD;&#xA;  begin&#xD;&#xA;&#x9;$l_status = 'SUCCESS';&#xD;&#xA;&#x9;$l_status_info = '';&#xD;&#xA;  end&#xD;&#xA;&#xD;&#xA;$l_metric_id = ABC_ADDAUDITMETRIC_FN( workflow_name(),                                                                                                   &#xD;&#xA;                                get_env('ETL_PROCESS_ID'),&#xD;&#xA;                                'CONSOLIDATION',&#xD;&#xA;                                $l_input_counter - $l_output_counter,&#xD;&#xA;                                'INT',   &#xD;&#xA;                                $l_status,&#xD;&#xA;                                $l_status_info,&#xD;&#xA;                                'NUMBER_OF_RECORDS_CHECK',&#xD;&#xA;                                'check consolidation lost no data');&#xD;&#xA;&#xD;&#xA;# associate the metric with relevant measures&#xD;&#xA;ABC_AUDIT_ASSOCIATE_FN($l_input_measure_id,$l_metric_id);&#xD;&#xA;ABC_AUDIT_ASSOCIATE_FN($l_output_measure_id,$l_metric_id);&#xD;&#xA;&#xD;&#xA;ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$l_output_counter" >
<DIExpression isString="true" expr="sql('DWSTAGING_DS', 'SELECT count(*) FROM EXCHANGE_MSC')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DWSTAGING_DS" datatype="VARCHAR" size="12" />
<CONSTANT value="SELECT count(*) FROM EXCHANGE_MSC" datatype="VARCHAR" size="33" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_output_measure_id" >
<DIExpression isString="true" expr="abc_addauditmeasure_fn($G_PROCESS_ID, workflow_name(), 'OUTPUT_CONSOLIDATED_ROWS', $l_output_counter, 'INT', 'volume check', 'number of output consolidated records')" >
<FUNCTION_CALL name="abc_addauditmeasure_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<FUNCTION_CALL name="workflow_name"  type="DI" />
<CONSTANT value="OUTPUT_CONSOLIDATED_ROWS" datatype="VARCHAR" size="24" />
<VARIABLE_REFERENCE name="$l_output_counter" />
<CONSTANT value="INT" datatype="VARCHAR" size="3" />
<CONSTANT value="volume check" datatype="VARCHAR" size="12" />
<CONSTANT value="number of output consolidated records" datatype="VARCHAR" size="37" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_input_counter != $l_output_counter)" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$l_input_counter" />
<VARIABLE_REFERENCE name="$l_output_counter" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'WARNING'" >
<CONSTANT value="WARNING" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_status_info" >
<DIExpression isString="true" expr="'Check the consolidation WF structure, check the DI logs for in memory errors and contact the support'" >
<CONSTANT value="Check the consolidation WF structure, check the DI logs for in memory errors and contact the support" datatype="VARCHAR" size="100" />
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'SUCCESS'" >
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_status_info" >
<DIExpression isString="true" expr="''" >
<CONSTANT value="" datatype="VARCHAR" size="0" />
</DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$l_metric_id" >
<DIExpression isString="true" expr="abc_addauditmetric_fn(workflow_name(), get_env('ETL_PROCESS_ID'), 'CONSOLIDATION', ($l_input_counter - $l_output_counter), 'INT', $l_status, $l_status_info, 'NUMBER_OF_RECORDS_CHECK', 'check consolidation lost no data')" >
<FUNCTION_CALL name="abc_addauditmetric_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />
</FUNCTION_CALL>
<CONSTANT value="CONSOLIDATION" datatype="VARCHAR" size="13" />
<SUBTRACT>
<VARIABLE_REFERENCE name="$l_input_counter" />
<VARIABLE_REFERENCE name="$l_output_counter" />
</SUBTRACT>
<CONSTANT value="INT" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$l_status" />
<VARIABLE_REFERENCE name="$l_status_info" />
<CONSTANT value="NUMBER_OF_RECORDS_CHECK" datatype="VARCHAR" size="23" />
<CONSTANT value="check consolidation lost no data" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_audit_associate_fn($l_input_measure_id, $l_metric_id)" >
<FUNCTION_CALL name="abc_audit_associate_fn"  type="DI" >
<VARIABLE_REFERENCE name="$l_input_measure_id" />
<VARIABLE_REFERENCE name="$l_metric_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_audit_associate_fn($l_output_measure_id, $l_metric_id)" >
<FUNCTION_CALL name="abc_audit_associate_fn"  type="DI" >
<VARIABLE_REFERENCE name="$l_output_measure_id" />
<VARIABLE_REFERENCE name="$l_metric_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_MS_CON_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_MS_CON_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_MS_CON_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_CON_PRODUCT_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:25:42"/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Order by BUSINESS_KEY from the source view"/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_MSC_STG"/>
<DIAttribute name="ui_display_name" value="QRY_ORDER_BY_ENTERPRISE_KEY"/>
</DIUIOptions>
<DISchema name="QRY_ORDER_BY_ENTERPRISE_KEY" >
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="ifthenelse(EXCHANGE_MSC_STG.MD_FLAG is null,$G_FLAG_DELETE ,EXCHANGE_MSC_STG.MD_FLAG)"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_MSC_STG.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="ifthenelse((EXCHANGE_MSC_STG.MD_FLAG IS  NULL ), $G_FLAG_DELETE, EXCHANGE_MSC_STG.MD_FLAG)" >
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="IS NULL">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="MD_FLAG" />
</LOGICAL_OP>
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="MD_FLAG" />
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_MSC_STG" />
</DIFrom>
<DIOrderBys>
<DIOrderBy direction="ASC">
<DIExpression isString="true" expr="EXCHANGE_MSC_STG.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC_STG" column="MD_ENTERPRISE_KEY" />
</DIExpression>
</DIOrderBy>
</DIOrderBys>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map MD_FLAG with $G_FLAG_NEW"/>
<DIAttribute name="ui_acta_from_schema_0" value="MO_INSERT_TO_NORMAL"/>
<DIAttribute name="ui_display_name" value="QRY_NEW"/>
</DIUIOptions>
<DISchema name="QRY_NEW" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_NEW"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_INSERT_TO_NORMAL.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_NEW" >
<VARIABLE_REFERENCE name="$G_FLAG_NEW" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_INSERT_TO_NORMAL.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_INSERT_TO_NORMAL" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="MO_INSERT_TO_NORMAL" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map MD_FLAG with $G_FLAG_UPDATE"/>
<DIAttribute name="ui_acta_from_schema_0" value="MO_UPDATE_TO_NORMAL"/>
<DIAttribute name="ui_display_name" value="QRY_UPDATE"/>
</DIUIOptions>
<DISchema name="QRY_UPDATE" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_UPDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_UPDATE_TO_NORMAL.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_UPDATE" >
<VARIABLE_REFERENCE name="$G_FLAG_UPDATE" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_UPDATE_TO_NORMAL.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_UPDATE_TO_NORMAL" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="MO_UPDATE_TO_NORMAL" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map records for delete"/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_DELETE_CASE_DELETE"/>
<DIAttribute name="ui_display_name" value="QRY_DELETE"/>
</DIUIOptions>
<DISchema name="QRY_DELETE" >
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.MD_FLAG"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_DELETE_CASE_DELETE.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.MD_FLAG" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="MD_FLAG" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_DELETE_CASE_DELETE.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_DELETE_CASE_DELETE" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_DELETE_CASE_DELETE" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map new record as normal"/>
<DIAttribute name="ui_display_name" value="MO_INSERT_TO_NORMAL"/>
</DIUIOptions>
<DIInputView name="EXCHANGE_CSNP"  />
<DISchema name="MO_INSERT_TO_NORMAL" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="normal"/>
<DIAttribute name="normal" value="discard"/>
<DIAttribute name="update" value="discard"/>
</DIAttributes>
</DITransformCall>
<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map update record as normal"/>
<DIAttribute name="ui_display_name" value="MO_UPDATE_TO_NORMAL"/>
</DIUIOptions>
<DIInputView name="EXCHANGE_CSNP"  />
<DISchema name="MO_UPDATE_TO_NORMAL" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="discard"/>
<DIAttribute name="normal" value="discard"/>
<DIAttribute name="update" value="normal"/>
</DIAttributes>
</DITransformCall>

<!-- GUID is optional -->
<DITransformCall typeId="210" name="Case_Operation"  >
<DIUIOptions>
<DIAttribute name="CS_DELETE_CASE_DELETE" value="Merge.MD_FLAG = $G_FLAG_DELETE"/>
<DIAttribute name="CS_DELETE_CASE_NON_DELETE" value="Merge.MD_FLAG != $G_FLAG_DELETE"/>
<DIAttribute name="ObjectDesc" value="Map case for delete or non-delete"/>
<DIAttribute name="ui_acta_from_schema_0" value="Merge"/>
<DIAttribute name="ui_display_name" value="CS_DELETE"/>
</DIUIOptions>
<DIInputView name="Merge" />
<DISchema name="CS_DELETE" >
</DISchema>
<DICase>
<DISwitch label="CASE_DELETE" outputView="CS_DELETE_CASE_DELETE" isDefault="false">
<DIExpression isString="true" expr="(Merge.MD_FLAG = $G_FLAG_DELETE)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="Merge" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="CASE_NON_DELETE" outputView="CS_DELETE_CASE_NON_DELETE" isDefault="false">
<DIExpression isString="true" expr="(Merge.MD_FLAG != $G_FLAG_DELETE)" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="Merge" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
</DICase>
<DIAttributes>
<DIAttribute name="Mutually_Exclusive" value="yes"/>
<DIAttribute name="Preserve_Expression_Order" value="no"/>
</DIAttributes>
</DITransformCall>
<DITransformCall typeId="111" name="Table_Comparison" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Compare non MD_ fields against EXCHANGE_CSNP. Also exclude the lastmoddate"/>
<DIAttribute name="ui_display_name" value="TC_EXCHANGE_CSNP_V"/>
</DIUIOptions>
<DIInputView name="CS_DELETE_CASE_NON_DELETE"  />
<DISchema name="EXCHANGE_CSNP" >
</DISchema>
<DIAttributes>
<DIAttribute name="cache_comparison_table" value="no"/>
<DIAttribute name="compare_column1" value="EXCHANGE_RATE"/>
<DIAttribute name="compare_column2" value="SOURCE_CURRENCY"/>
<DIAttribute name="compare_column3" value="START_DATE_LOC"/>
<DIAttribute name="compare_column4" value="START_DATE_UTC"/>
<DIAttribute name="compare_column5" value="TARGET_CURRENCY"/>
<DIAttribute name="compare_column6" value="END_DATE_LOC"/>
<DIAttribute name="compare_column7" value="END_DATE_UTC"/>
<DIAttribute name="database_datastore" value="DWSTAGING_DS"/>
<DIAttribute name="detect_all_dup_deletes" value="no"/>
<DIAttribute name="detect_delete" value="no"/>
<DIAttribute name="primary_key_column1" value="MD_ENTERPRISE_KEY"/>
<DIAttribute name="run_as_separate_process" value="no"/>
<DIAttribute name="source_is_sorted" value="yes"/>
<DIAttribute name="table_name" value="EXCHANGE_CSNP"/>
<DIAttribute name="table_owner" value="DWSTAGING_ALIAS"/>
<DIAttribute name="update_cache" value="no"/>
</DIAttributes>
</DITransformCall>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Handle conversion of dates"/>
<DIAttribute name="ui_acta_from_schema_0" value="MRG_NEW_UPD_DEL"/>
<DIAttribute name="ui_display_name" value="QRY_CONV"/>
</DIUIOptions>
<DISchema name="QRY_CONV" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.MD_FLAG"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW_UPD_DEL.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.MD_FLAG" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="MD_FLAG" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW_UPD_DEL.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW_UPD_DEL" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="MRG_NEW_UPD_DEL" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DITransformCall typeId="111" name="Merge" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Merge new, update and delete records to post to the target MSC table"/>
<DIAttribute name="ui_display_name" value="MRG_NEW_UPD_DEL"/>
</DIUIOptions>
<DIInputView name="QRY_CSNP"  />
<DIInputView name="QRY_NEW"  />
<DIInputView name="QRY_UPDATE"  />
<DISchema name="MRG_NEW_UPD_DEL" >
</DISchema>
</DITransformCall>
<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSC" >
<DIInputView name="QRY_CONV"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load>1</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>overflow_file</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>no</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>truncate</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>write_data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSC_STG" >
<DIOutputView name="EXCHANGE_MSC_STG"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_CSNP" >
<DIOutputView name="EXCHANGE_CSNP_1"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="QRY_DELETE"/>
<DIAttribute name="ui_acta_from_schema_1" value="EXCHANGE_CSNP_1"/>
<DIAttribute name="ui_display_name" value="QRY_CSNP"/>
<DIAttribute name="ui_where_text" value="EXCHANGE_CSNP_1.MD_ENTERPRISE_KEY = QRY_DELETE.MD_ENTERPRISE_KEY"/>
</DIUIOptions>
<DISchema name="QRY_CSNP" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_DELETE"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_CSNP_1.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_DELETE" >
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_CSNP_1.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_CSNP_1" />
<DITableSpec name="QRY_DELETE" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(EXCHANGE_CSNP_1.MD_ENTERPRISE_KEY = QRY_DELETE.MD_ENTERPRISE_KEY)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_CSNP_1" column="MD_ENTERPRISE_KEY" />
<COLUMN_REFERENCE  qualifier1="QRY_DELETE" column="MD_ENTERPRISE_KEY" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_HISTORY_ENTERPRISE_XREF" >
<DIOutputView name="EXCHANGE_HISTORY_ENTERPRISE_XREF"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_ENTERPRISE_XREF" >
<DIOutputView name="EXCHANGE_ENTERPRISE_XREF"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_HISTORY_ENTERPRISE_XREF"/>
<DIAttribute name="ui_display_name" value="QRY_CUR_BATCH"/>
<DIAttribute name="ui_where_text" value="EXCHANGE_HISTORY_ENTERPRISE_XREF.MD_BATCH_ID=$G_BATCH_ID"/>
</DIUIOptions>
<DISchema name="QRY_CUR_BATCH" >
<DIElement name="ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_HISTORY_ENTERPRISE_XREF.ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect isDistinct="true">
<DIProjection>
<DIExpression isString="true" expr="EXCHANGE_HISTORY_ENTERPRISE_XREF.ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_HISTORY_ENTERPRISE_XREF" column="ENTERPRISE_KEY" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_HISTORY_ENTERPRISE_XREF" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(EXCHANGE_HISTORY_ENTERPRISE_XREF.MD_BATCH_ID = $G_BATCH_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_HISTORY_ENTERPRISE_XREF" column="MD_BATCH_ID" />
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_ENTERPRISE_XREF"/>
<DIAttribute name="ui_acta_from_schema_1" value="QRY_CUR_BATCH"/>
<DIAttribute name="ui_display_name" value="QRY_GET_DEL"/>
<DIAttribute name="ui_where_text" value="QRY_CUR_BATCH.ENTERPRISE_KEY=EXCHANGE_ENTERPRISE_XREF.ENTERPRISE_KEY"/>
</DIUIOptions>
<DISchema name="QRY_GET_DEL" >
<DIElement name="ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="QRY_CUR_BATCH.ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="ENTERPRISE_XREF_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_ENTERPRISE_XREF.ENTERPRISE_XREF_ID"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="QRY_CUR_BATCH.ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="QRY_CUR_BATCH" column="ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_ENTERPRISE_XREF.ENTERPRISE_XREF_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_ENTERPRISE_XREF" column="ENTERPRISE_XREF_ID" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="QRY_CUR_BATCH" />
<DITableSpec name="EXCHANGE_ENTERPRISE_XREF" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(QRY_CUR_BATCH.ENTERPRISE_KEY = EXCHANGE_ENTERPRISE_XREF.ENTERPRISE_KEY)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="QRY_CUR_BATCH" column="ENTERPRISE_KEY" />
<COLUMN_REFERENCE  qualifier1="EXCHANGE_ENTERPRISE_XREF" column="ENTERPRISE_KEY" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
<DILeftOuterJoin>
<DILeftOuterJoinPair outer="QRY_CUR_BATCH" inner="EXCHANGE_ENTERPRISE_XREF"  />
</DILeftOuterJoin>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Order by BUSINESS_KEY from the source view"/>
<DIAttribute name="ui_acta_from_schema_0" value="QRY_GET_DEL"/>
<DIAttribute name="ui_display_name" value="QRY_ADD_DEL"/>
<DIAttribute name="ui_where_text" value="QRY_GET_DEL.ENTERPRISE_XREF_ID is null"/>
</DIUIOptions>
<DISchema name="QRY_ADD_DEL" >
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="QRY_GET_DEL.ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_DELETE"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="QRY_GET_DEL.ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="QRY_GET_DEL" column="ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_DELETE" >
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="QRY_GET_DEL" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(QRY_GET_DEL.ENTERPRISE_XREF_ID IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<COLUMN_REFERENCE  qualifier1="QRY_GET_DEL" column="ENTERPRISE_XREF_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
<DIOrderBys>
<DIOrderBy direction="ASC">
<DIExpression isString="true" expr="QRY_GET_DEL.ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="QRY_GET_DEL" column="ENTERPRISE_KEY" />
</DIExpression>
</DIOrderBy>
</DIOrderBys>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DITransformCall typeId="111" name="Merge" >
<DIInputView name="QRY_ADD_DEL"  />
<DIInputView name="QRY_ORDER_BY_ENTERPRISE_KEY"  />
<DISchema name="Merge" >
</DISchema>
</DITransformCall>
</DITransforms>
<DIAttributes>
<DIAttribute name="Audit" hasNestedXMLTree ="true">
<Audit>
          <AuditObjects/>
          <AuditRules/>
          <Notifications>
            <RaiseException Enabled="true"/>
            <Mail Enabled="false"/>
            <Script Enabled="false"/>
          </Notifications>
        </Audit>
</DIAttribute>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_DIM_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_XFR_DIM_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_XFR_DIM_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is responsible for loading dimension records into target staging and processing the flagged records into the appropriate load-ready XFR tables (XFRD for logical delete), (XFRU for slowly changing dimension type 1 and type 2 updates), (XFRN for new dimension records). "/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version $)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The workflow {TARGET DIMENSION NAME}_XFR_WF is the workflow responsible for loading dimension tables in target staging.  The workflow will be composed of the following objects:&#xD;&#xA; {TARGET DIMENSION NAME}_XFR_TRY . The beginning of the TRY/CATCH block in Data Services&#xD;&#xA; {TARGET DIMENSION NAME}_XFR_START_SC . The script that calls the custom function that initiates the metadata tracking for the workflow. The script also calls the custom function that creates pseudo surrogate key record. &#xD;&#xA; {TARGET DIMENSION NAME}_XFR_DF . The dataflow that based on the incoming Multiple Source Consolidation MSC table, checks the value of the MD_FLAG field for each record, which will specify if the record is of type insert, update or delete.&#xD;&#xA; {TARGET DIMENSION NAME}_XFR_END_SC . The script that calls the custom function that closes the metadata for the workflow.&#xD;&#xA; {TARGET DIMENSION NAME}_XFR_CATCH . The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_IDENTIFIER" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_MAX_WF_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFR_DIM_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFR_DIM_START_SC"/>
<DIAttribute name="ui_script_text" value="#WORKFLOW NAME&#xD;&#xA;$L_WF_NAME = workflow_name();&#xD;&#xA;&#xD;&#xA;# GET MAX PROCESS_ID OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID&#xD;&#xA;$L_MAX_WF_PROCESS_ID=M_ICPS_GET_MAX_WF_PROCESS_ID($G_BATCH_ID,$L_WF_NAME,job_name( ));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# GET LAST EXECUTION STATUS OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID, ACCORDING TO MAX PROCESS_ID&#xD;&#xA;$L_LATEST_WF_STATUS =M_ICPS_GET_WF_STATUS($L_MAX_WF_PROCESS_ID,$L_WF_NAME );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="workflow_name()" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_MAX_WF_PROCESS_ID" >
<DIExpression isString="true" expr="m_icps_get_max_wf_process_id($G_BATCH_ID, $L_WF_NAME, job_name())" >
<FUNCTION_CALL name="m_icps_get_max_wf_process_id"  type="DI" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<FUNCTION_CALL name="job_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LATEST_WF_STATUS" >
<DIExpression isString="true" expr="m_icps_get_wf_status($L_MAX_WF_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="m_icps_get_wf_status"  type="DI" >
<VARIABLE_REFERENCE name="$L_MAX_WF_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DIIfStep typeId="2" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="If_condition" value="$L_LATEST_WF_STATUS&lt;&gt;'SUCCESS'  or $L_LATEST_WF_STATUS is null"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFR_CONDITION"/>
</DIUIOptions>
<DIExpression isString="true" expr="(($L_LATEST_WF_STATUS != 'SUCCESS') OR&#xA;   ($L_LATEST_WF_STATUS IS  NULL ))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_XFR_DIM_DF" >
</DICallStep>
</DIIf>
<DIElse>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="PRINT"/>
<DIAttribute name="ui_script_text" value="ETL_PRINT('PREVIOS RUN OF WORKFLOW &gt;&gt; '||$L_WF_NAME||' FOR BATCH ID &gt;&gt; '||$G_BATCH_ID||' HAS FINISHED SUCCESSFULLY!');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('PREVIOS RUN OF WORKFLOW &gt;&gt; ' || $L_WF_NAME) || ' FOR BATCH ID &gt;&gt; ') || $G_BATCH_ID) || ' HAS FINISHED SUCCESSFULLY!'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="PREVIOS RUN OF WORKFLOW &gt;&gt; " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</CONCAT>
<CONSTANT value=" FOR BATCH ID &gt;&gt; " datatype="VARCHAR" size="17" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</CONCAT>
<CONSTANT value=" HAS FINISHED SUCCESSFULLY!" datatype="VARCHAR" size="27" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DIElse>
</DIIfStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object that calls the custom end workflow function.  This script closes the metadata records that are part of this process."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFR_DIM_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFR_DIM_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script is called upon the Failure of the Workflow"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFR_DIM_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_XFR_DIM_DF" typeId="1" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="Based on the incoming MSC table, check the value of the MD_FLAG field for each record, which will specify if the record is of type insert, update or delete. The MD_* fields are populated as appropriate in each QRY transform and pushed to the appropriate load ready XFR table."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The dataflow that based on the incoming Multiple Source Consolidation MSC table, checks the value of the MD_FLAG field for each record, which will specify if the record is of type insert, update or . Then process and load the appropriate XFR target staging table."/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Records with MD_FLAG value of delete are marked with delete history information and pushed to the load-ready XFRD table."/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_MD_FLAG_CS_DEL"/>
<DIAttribute name="ui_display_name" value="QRY_DEL"/>
</DIUIOptions>
<DISchema name="QRY_DEL" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'N'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, 'PRE_LOAD_CACHE', 'MAX'], [ MD_SURROGATE_KEY ], [ -2 ], [ MD_DURABLE_KEY, '=', CS_MD_FLAG_CS_DEL.MD_ENTERPRISE_KEY ]) SET(&quot;run_as_separate_process&quot; = 'no')"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="'N'" >
<CONSTANT value="N" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, 'PRE_LOAD_CACHE', 'MAX'], [ MD_SURROGATE_KEY ], [ -2 ], [ MD_DURABLE_KEY, '=', CS_MD_FLAG_CS_DEL.MD_ENTERPRISE_KEY ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="MD_ENTERPRISE_KEY" />
<CONSTANT value="-2" datatype="INT" />
<DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_MD_FLAG_CS_DEL" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Records with MD_FLAG value of new are marked with new MD attribute values and are pushed to the load-ready XFRN table."/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_MD_FLAG_CS_NEW"/>
<DIAttribute name="ui_display_name" value="QRY_NEW"/>
</DIUIOptions>
<DISchema name="QRY_NEW" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_MD_FLAG_CS_NEW" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Query for only SCD1 updates, (where MD_FLAG &lt;&gt; 5 OR MD_FLAG IS NULL OR MD_FLAG = 'UPD') as update only XFRU)."/>
<DIAttribute name="ui_acta_from_schema_0" value="MO_TYPE1"/>
<DIAttribute name="ui_display_name" value="QRY_SCD1_UPDATE"/>
<DIAttribute name="ui_where_text" value="(MO_TYPE1.MD_ACTIVESTATUSIND &lt;&gt; '5') OR&#xD;&#xA;   (MO_TYPE1.MD_ACTIVESTATUSIND IS  NULL )"/>
</DIUIOptions>
<DISchema name="QRY_SCD1_UPDATE" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, 'PRE_LOAD_CACHE', 'MAX'], [ MD_SURROGATE_KEY ], [ -2 ], [ MD_DURABLE_KEY, '=', MO_TYPE1.MD_DURABLE_KEY ]) SET(&quot;run_as_separate_process&quot; = 'no')"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE1.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, 'PRE_LOAD_CACHE', 'MAX'], [ MD_SURROGATE_KEY ], [ -2 ], [ MD_DURABLE_KEY, '=', MO_TYPE1.MD_DURABLE_KEY ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="MD_DURABLE_KEY" />
<CONSTANT value="-2" datatype="INT" />
<DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE1.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="MO_TYPE1" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="((MO_TYPE1.MD_ACTIVESTATUSIND != '5') OR&#xA;   (MO_TYPE1.MD_ACTIVESTATUSIND IS  NULL ))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="MD_ACTIVESTATUSIND" />
<CONSTANT value="5" datatype="VARCHAR" size="1" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<COLUMN_REFERENCE  qualifier1="MO_TYPE1" column="MD_ACTIVESTATUSIND" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DITransformCall typeId="111" name="History_Preserving" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Preserve history on the SCD2 fields identified under compare columns."/>
<DIAttribute name="ui_display_name" value="HP_EXCHANGE_DIM_V"/>
</DIUIOptions>
<DIInputView name="EXCHANGE_DIM_V"  />
<DISchema name="HP_EXCHANGE_DIM_V" >
</DISchema>
<DIAttributes>
<DIAttribute name="compare_column1" value="MD_DURABLE_KEY"/>
<DIAttribute name="current_flag_column" value="MD_ACTIVESTATUSIND"/>
<DIAttribute name="current_flag_reset_value" value="5"/>
<DIAttribute name="current_flag_set_value" value="0"/>
<DIAttribute name="detect_delete" value="no"/>
<DIAttribute name="valid_from_delta_column" value="0"/>
<DIAttribute name="valid_to_date_value" value="9000.12.31"/>
</DIAttributes>
</DITransformCall>
<DITransformCall typeId="111" name="Table_Comparison" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Perform a table compare against the snapshot table to see if this is an SCD1 or SCD2 type update."/>
<DIAttribute name="ui_display_name" value="TC_EXCHANGE_DIM_V"/>
</DIUIOptions>
<DIInputView name="QRY_SORT"  />
<DISchema name="EXCHANGE_DIM_V" >
</DISchema>
<DIAttributes>
<DIAttribute name="cache_comparison_table" value="no"/>
<DIAttribute name="compare_column1" value="EXCHANGE_RATE"/>
<DIAttribute name="compare_column2" value="SOURCE_CURRENCY"/>
<DIAttribute name="compare_column3" value="START_DATE_LOC"/>
<DIAttribute name="compare_column4" value="START_DATE_UTC"/>
<DIAttribute name="compare_column5" value="TARGET_CURRENCY"/>
<DIAttribute name="compare_column6" value="END_DATE_LOC"/>
<DIAttribute name="compare_column7" value="END_DATE_UTC"/>
<DIAttribute name="database_datastore" value="DW_DS"/>
<DIAttribute name="detect_all_dup_deletes" value="no"/>
<DIAttribute name="detect_delete" value="no"/>
<DIAttribute name="primary_key_column1" value="MD_DURABLE_KEY"/>
<DIAttribute name="run_as_separate_process" value="no"/>
<DIAttribute name="source_is_sorted" value="yes"/>
<DIAttribute name="table_name" value="EXCHANGE_DIM_V"/>
<DIAttribute name="table_owner" value="DW_ALIAS"/>
<DIAttribute name="update_cache" value="no"/>
</DIAttributes>
</DITransformCall>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Create new records and default with MD_ACTIVESTATUSIND with "/>
<DIAttribute name="ui_acta_from_schema_0" value="MO_TYPE2"/>
<DIAttribute name="ui_display_name" value="QRY_SCD2_NEW"/>
</DIUIOptions>
<DISchema name="QRY_SCD2_NEW" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="MO_TYPE2" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DITransformCall typeId="111" name="Merge" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Merge new records and type SCD2 new records to be pushed into the target dimension."/>
<DIAttribute name="ui_display_name" value="MRG_NEW"/>
</DIUIOptions>
<DIInputView name="QRY_NEW"  />
<DIInputView name="QRY_SCD2_NEW"  />
<DISchema name="MRG_NEW" >
</DISchema>
</DITransformCall>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Query only SCD2 type updates and set the appropriate MD field values."/>
<DIAttribute name="ui_acta_from_schema_0" value="MO_TYPE2"/>
<DIAttribute name="ui_display_name" value="QRY_SCD2_UPDATE"/>
</DIUIOptions>
<DISchema name="QRY_SCD2_UPDATE" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'Y'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MO_TYPE2.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'N'"/>
</DIAttributes>
</DIElement>
<DIElement name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, 'PRE_LOAD_CACHE', 'MAX'], [ MD_SURROGATE_KEY ], [ -2 ], [ MD_DURABLE_KEY, '=', MO_TYPE2.MD_DURABLE_KEY ]) SET(&quot;run_as_separate_process&quot; = 'no')"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="'Y'" >
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="MO_TYPE2.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="'N'" >
<CONSTANT value="N" datatype="VARCHAR" size="1" />
</DIExpression>
<DIExpression isString="true" expr="lookup_ext([DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, 'PRE_LOAD_CACHE', 'MAX'], [ MD_SURROGATE_KEY ], [ -2 ], [ MD_DURABLE_KEY, '=', MO_TYPE2.MD_DURABLE_KEY ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<COLUMN_REFERENCE  qualifier1="MO_TYPE2" column="MD_DURABLE_KEY" />
<CONSTANT value="-2" datatype="INT" />
<DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="MO_TYPE2" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Sort incoming records by ENTERPRISE_KEY in order to do table compare"/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_MD_FLAG_CS_UPD"/>
<DIAttribute name="ui_display_name" value="QRY_ORDER_BY_ENTERPRISE_KEY"/>
</DIUIOptions>
<DISchema name="QRY_SORT" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_FLAG"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_BATCH_ID" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_PROCESS_ID" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_FLAG" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_FLAG" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_MD_FLAG_CS_UPD" />
</DIFrom>
<DIOrderBys>
<DIOrderBy direction="ASC">
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_ENTERPRISE_KEY" />
</DIExpression>
</DIOrderBy>
</DIOrderBys>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>


<!-- GUID is optional -->
<DITransformCall typeId="210" name="Case_Operation"  >
<DIUIOptions>
<DIAttribute name="CS_MD_FLAG_CS_DEL" value="EXCHANGE_MSC.MD_FLAG = $G_FLAG_DELETE"/>
<DIAttribute name="CS_MD_FLAG_CS_NEW" value="EXCHANGE_MSC.MD_FLAG = $G_FLAG_NEW "/>
<DIAttribute name="CS_MD_FLAG_CS_UPD" value="EXCHANGE_MSC.MD_FLAG = $G_FLAG_UPDATE "/>
<DIAttribute name="ObjectDesc" value="Check the value of the incoming MD_FLAG to determine the case statement to execute."/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_MSC"/>
<DIAttribute name="ui_display_name" value="CS_MD_FLAG"/>
</DIUIOptions>
<DIInputView name="EXCHANGE_MSC" />
<DISchema name="CS_MD_FLAG" >
</DISchema>
<DICase>
<DISwitch label="CS_DEL" outputView="CS_MD_FLAG_CS_DEL" isDefault="false">
<DIExpression isString="true" expr="(EXCHANGE_MSC.MD_FLAG = $G_FLAG_DELETE)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="CS_NEW" outputView="CS_MD_FLAG_CS_NEW" isDefault="false">
<DIExpression isString="true" expr="(EXCHANGE_MSC.MD_FLAG = $G_FLAG_NEW)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_NEW" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="CS_UPD" outputView="CS_MD_FLAG_CS_UPD" isDefault="false">
<DIExpression isString="true" expr="(EXCHANGE_MSC.MD_FLAG = $G_FLAG_UPDATE)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_UPDATE" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
</DICase>
<DIAttributes>
<DIAttribute name="Mutually_Exclusive" value="yes"/>
<DIAttribute name="Preserve_Expression_Order" value="no"/>
</DIAttributes>
</DITransformCall>
<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map type SCD2 fields as both insert and update"/>
<DIAttribute name="ui_display_name" value="MO_TYPE2"/>
</DIUIOptions>
<DIInputView name="HP_EXCHANGE_DIM_V"  />
<DISchema name="MO_TYPE2" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="insert"/>
<DIAttribute name="normal" value="discard"/>
<DIAttribute name="update" value="discard"/>
</DIAttributes>
</DITransformCall>
<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map type SCD1 records as a simple update"/>
<DIAttribute name="ui_display_name" value="MO_TYPE1"/>
</DIUIOptions>
<DIInputView name="HP_EXCHANGE_DIM_V"  />
<DISchema name="MO_TYPE1" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="discard"/>
<DIAttribute name="normal" value="discard"/>
<DIAttribute name="update" value="insert"/>
</DIAttributes>
</DITransformCall>
<DITransformCall typeId="111" name="Merge" >
<DIUIOptions>
<DIAttribute name="ui_display_name" value="MRG_UPDATE"/>
</DIUIOptions>
<DIInputView name="QRY_SCD1_UPDATE"  />
<DIInputView name="QRY_SCD2_UPDATE"  />
<DISchema name="MRG_UPDATE" >
</DISchema>
</DITransformCall>
<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSC" >
<DIOutputView name="EXCHANGE_MSC"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRD" >
<DIInputView name="QRY_DEL"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load>1</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>yes</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>overflow_file</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>no</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>truncate</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>write_data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRN" >
<DIInputView name="QRY_PK_ID"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load>1</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>overflow_file</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>no</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>truncate</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>write_data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRU" >
<DIInputView name="MRG_UPDATE"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load>1</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>overflow_file</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>no</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>truncate</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>write_data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Generate new PK ID field for new records"/>
<DIAttribute name="ui_acta_from_schema_0" value="MRG_NEW"/>
<DIAttribute name="ui_display_name" value="QRY_PK_ID"/>
</DIUIOptions>
<DISchema name="QRY_PK_ID" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_ACTIVESTATUSIND"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_CREATEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_DELETEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_LASTMODDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_TRANSENDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.MD_TRANSLASTIND"/>
</DIAttributes>
</DIElement>
<DIElement name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="greatest(5+gen_row_num(),key_generation('DW_DS.DW_ALIAS.EXCHANGE_DIM', 'PK_EXCHANGE_ID', 1))"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="MRG_NEW.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="MRG_NEW.MD_BATCH_ID" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_PROCESS_ID" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_ACTIVESTATUSIND" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_ACTIVESTATUSIND" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_CREATEDDATE" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_CREATEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_DELETEDDATE" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_DELETEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_LASTMODDATE" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_LASTMODDATE" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_TRANSENDDATE" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_TRANSENDDATE" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.MD_TRANSLASTIND" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="MD_TRANSLASTIND" />
</DIExpression>
<DIExpression isString="true" expr="greatest((5 + gen_row_num()), key_generation(DW_DS.DW_ALIAS.EXCHANGE_DIM, 'PK_EXCHANGE_ID', 1) )" >
<FUNCTION_CALL name="greatest"  type="DI" >
<ADD>
<CONSTANT value="5" datatype="INT" />
<FUNCTION_CALL name="gen_row_num"  type="DI" />
</ADD>
<FUNCTION_CALL name="key_generation"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="EXCHANGE_DIM" >
<CONSTANT value="PK_EXCHANGE_ID" datatype="VARCHAR" size="14" />
<CONSTANT value="1" datatype="INT" />
</FUNCTION_CALL>
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="MRG_NEW.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="MRG_NEW" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="MRG_NEW" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_LOOKUP_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_LOOKUP_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_LOOKUP_WF" typeId="2" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_KEY_LOOKUP_DEL_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_KEY_LOOKUP_UPD_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_KEY_LOOKUP_NEW_WF" >
</DICallStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_KEY_LOOKUP_DEL_WF" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The workflow {TARGET DIMENSION NAME}_LOOKUP_WF is the workflow responsible for loading dimension keys that are generated into the table DIMENSIONKEY_LOOKUP.  The workflow will be composed of the following objects:&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_TRY . The beginning of the TRY/CATCH block in Data Services&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_START_SC . The script that calls the custom function that initiates the metadata tracking for the workflow. The script also calls the custom function that creates pseudo surrogate key record. &#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_DEL_DF . The dataflow that is based on the incoming _XFRD load ready target staging tables to query the DIMENSIONKEY_LOOKUP table with the records to delete and Map all rows as Normal for deletion.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_UPD_DF . The dataflow that is based on the incoming _XFRU load ready target staging tables to query based on the durable key field and post updates to DIMENSIONKEY_LOOKUP table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_NEW_DF . The dataflow that is based on the incoming _XFRN load ready target staging tables to populate the dimension name, durable and surrogate key fields for new records to the DIMENSIONKEY_LOOKUP table. This table is then used as a lookup table for the fact table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_END_SC . The script that calls the custom function that closes the metadata for the workflow.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_CATCH . The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_IDENTIFIER" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_MAX_WF_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_DEL_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_DEL_START_SC"/>
<DIAttribute name="ui_script_text" value="#WORKFLOW NAME&#xD;&#xA;$L_WF_NAME = workflow_name();&#xD;&#xA;&#xD;&#xA;# GET MAX PROCESS_ID OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID&#xD;&#xA;$L_MAX_WF_PROCESS_ID=M_ICPS_GET_MAX_WF_PROCESS_ID($G_BATCH_ID,$L_WF_NAME,job_name( ));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# GET LAST EXECUTION STATUS OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID, ACCORDING TO MAX PROCESS_ID&#xD;&#xA;$L_LATEST_WF_STATUS =M_ICPS_GET_WF_STATUS($L_MAX_WF_PROCESS_ID,$L_WF_NAME );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="workflow_name()" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_MAX_WF_PROCESS_ID" >
<DIExpression isString="true" expr="m_icps_get_max_wf_process_id($G_BATCH_ID, $L_WF_NAME, job_name())" >
<FUNCTION_CALL name="m_icps_get_max_wf_process_id"  type="DI" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<FUNCTION_CALL name="job_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LATEST_WF_STATUS" >
<DIExpression isString="true" expr="m_icps_get_wf_status($L_MAX_WF_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="m_icps_get_wf_status"  type="DI" >
<VARIABLE_REFERENCE name="$L_MAX_WF_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DIIfStep typeId="2" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="If_condition" value="$L_LATEST_WF_STATUS&lt;&gt;'SUCCESS'  or $L_LATEST_WF_STATUS is null"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_DEL_CONDITION"/>
</DIUIOptions>
<DIExpression isString="true" expr="(($L_LATEST_WF_STATUS != 'SUCCESS') OR&#xA;   ($L_LATEST_WF_STATUS IS  NULL ))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_KEY_LOOKUP_DEL_DF" >
</DICallStep>
</DIIf>
<DIElse>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="Print"/>
<DIAttribute name="ui_script_text" value="ETL_PRINT('PREVIOS RUN OF WORKFLOW &gt;&gt; '||$L_WF_NAME||' FOR BATCH ID &gt;&gt; '||$G_BATCH_ID||' HAS FINISHED SUCCESSFULLY!');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('PREVIOS RUN OF WORKFLOW &gt;&gt; ' || $L_WF_NAME) || ' FOR BATCH ID &gt;&gt; ') || $G_BATCH_ID) || ' HAS FINISHED SUCCESSFULLY!'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="PREVIOS RUN OF WORKFLOW &gt;&gt; " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</CONCAT>
<CONSTANT value=" FOR BATCH ID &gt;&gt; " datatype="VARCHAR" size="17" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</CONCAT>
<CONSTANT value=" HAS FINISHED SUCCESSFULLY!" datatype="VARCHAR" size="27" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DIElse>
</DIIfStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom end workflow function.  This script closes the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_DEL_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_DEL_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script is called upon the failure of the workflow"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_KEY_LOOKUP_DEL_DF" typeId="1" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This dataflow sources the load ready delete table and updates the surrogate key record in the &lt;ENTITY&gt;_KEY_LOOKUP table with a deletion date and flags it as a deleted record"/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The dataflow that is based on the incoming _XFRD load ready target staging tables to query the ENTITY_KEY_LOOKUP table with the records to delete and Map all rows as Normal for deletion"/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Query the delete records and update the &lt;ENTITY&gt; KEY_LOOKUP table with deletion date and delete flag"/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_DIM_XFRD"/>
<DIAttribute name="ui_display_name" value="QRY_DEL"/>
</DIUIOptions>
<DISchema name="QRY_DEL" >
<DIElement name="PK_EXCHANGE_LOOKUP_ID" datatype="INT" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="lookup(DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, PK_EXCHANGE_LOOKUP_ID, -2, 'NO_CACHE', MD_DURABLE_KEY, MD_DURABLE_KEY, MD_SURROGATE_KEY, PK_EXCHANGE_ID)"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRD.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_SURROGATE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRD.PK_EXCHANGE_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_DELETE "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="lookup(DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, PK_EXCHANGE_LOOKUP_ID, -2, 'NO_CACHE', MD_DURABLE_KEY, MD_DURABLE_KEY, MD_SURROGATE_KEY, PK_EXCHANGE_ID) " >
<FUNCTION_CALL name="lookup"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<COLUMN_REFERENCE  column="PK_EXCHANGE_LOOKUP_ID" />
<CONSTANT value="-2" datatype="INT" />
<CONSTANT value="NO_CACHE" datatype="VARCHAR" size="8" />
<COLUMN_REFERENCE  column="MD_DURABLE_KEY" />
<COLUMN_REFERENCE  column="MD_DURABLE_KEY" />
<COLUMN_REFERENCE  column="MD_SURROGATE_KEY" />
<COLUMN_REFERENCE  column="PK_EXCHANGE_ID" />
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRD.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRD" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRD.PK_EXCHANGE_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRD" column="PK_EXCHANGE_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_DELETE" >
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_DIM_XFRD" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRD" >
<DIOutputView name="EXCHANGE_DIM_XFRD"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<DIInputView name="QRY_DEL"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>write_data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="EXCHANGE_KEY_LOOKUP_UPD_WF" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The workflow {TARGET DIMENSION NAME}_LOOKUP_WF is the workflow responsible for loading dimension keys that are generated into the table DIMENSIONKEY_LOOKUP.  The workflow will be composed of the following objects:&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_TRY . The beginning of the TRY/CATCH block in Data Services&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_START_SC . The script that calls the custom function that initiates the metadata tracking for the workflow. The script also calls the custom function that creates pseudo surrogate key record. &#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_DEL_DF . The dataflow that is based on the incoming _XFRD load ready target staging tables to query the DIMENSIONKEY_LOOKUP table with the records to delete and Map all rows as Normal for deletion.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_UPD_DF . The dataflow that is based on the incoming _XFRU load ready target staging tables to query based on the durable key field and post updates to DIMENSIONKEY_LOOKUP table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_NEW_DF . The dataflow that is based on the incoming _XFRN load ready target staging tables to populate the dimension name, durable and surrogate key fields for new records to the DIMENSIONKEY_LOOKUP table. This table is then used as a lookup table for the fact table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_END_SC . The script that calls the custom function that closes the metadata for the workflow.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_CATCH . The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_IDENTIFIER" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_MAX_WF_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_UPD_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_UPD_START_SC"/>
<DIAttribute name="ui_script_text" value="#WORKFLOW NAME&#xD;&#xA;$L_WF_NAME = workflow_name();&#xD;&#xA;&#xD;&#xA;# GET MAX PROCESS_ID OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID&#xD;&#xA;$L_MAX_WF_PROCESS_ID=M_ICPS_GET_MAX_WF_PROCESS_ID($G_BATCH_ID,$L_WF_NAME,job_name( ));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# GET LAST EXECUTION STATUS OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID, ACCORDING TO MAX PROCESS_ID&#xD;&#xA;$L_LATEST_WF_STATUS =M_ICPS_GET_WF_STATUS($L_MAX_WF_PROCESS_ID,$L_WF_NAME );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="workflow_name()" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_MAX_WF_PROCESS_ID" >
<DIExpression isString="true" expr="m_icps_get_max_wf_process_id($G_BATCH_ID, $L_WF_NAME, job_name())" >
<FUNCTION_CALL name="m_icps_get_max_wf_process_id"  type="DI" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<FUNCTION_CALL name="job_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LATEST_WF_STATUS" >
<DIExpression isString="true" expr="m_icps_get_wf_status($L_MAX_WF_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="m_icps_get_wf_status"  type="DI" >
<VARIABLE_REFERENCE name="$L_MAX_WF_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DIIfStep typeId="2" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="If_condition" value="$L_LATEST_WF_STATUS&lt;&gt;'SUCCESS'  or $L_LATEST_WF_STATUS is null"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_UPD_CONDITION"/>
</DIUIOptions>
<DIExpression isString="true" expr="(($L_LATEST_WF_STATUS != 'SUCCESS') OR&#xA;   ($L_LATEST_WF_STATUS IS  NULL ))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_KEY_LOOKUP_UPD_DF" >
</DICallStep>
</DIIf>
<DIElse>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="PRINT"/>
<DIAttribute name="ui_script_text" value="ETL_PRINT('PREVIOS RUN OF WORKFLOW &gt;&gt; '||$L_WF_NAME||' FOR BATCH ID &gt;&gt; '||$G_BATCH_ID||' HAS FINISHED SUCCESSFULLY!');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('PREVIOS RUN OF WORKFLOW &gt;&gt; ' || $L_WF_NAME) || ' FOR BATCH ID &gt;&gt; ') || $G_BATCH_ID) || ' HAS FINISHED SUCCESSFULLY!'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="PREVIOS RUN OF WORKFLOW &gt;&gt; " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</CONCAT>
<CONSTANT value=" FOR BATCH ID &gt;&gt; " datatype="VARCHAR" size="17" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</CONCAT>
<CONSTANT value=" HAS FINISHED SUCCESSFULLY!" datatype="VARCHAR" size="27" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DIElse>
</DIIfStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom end workflow function.  This script closes the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_UPD_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_UPD_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script is called upon the failure of the workflow"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_KEY_LOOKUP_UPD_DF" typeId="1" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This dataflow sources the load ready update table and updates the surrogate key record in the &lt;ENTITY&gt;_KEY_LOOKUP table with a modification date and flags it as an updated record"/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The dataflow that is based on the incoming _XFRU load ready target staging tables to query based on the durable key field and post updates to DIMENSIONKEY_LOOKUP table"/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Query the update records and update the &lt;ENTITY&gt; KEY_LOOKUP table with a last modification date and update flag"/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_DIM_XFRU"/>
<DIAttribute name="ui_display_name" value="QRY_UPD"/>
</DIUIOptions>
<DISchema name="QRY_UPD" >
<DIElement name="PK_EXCHANGE_LOOKUP_ID" datatype="INT" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="lookup(DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, PK_EXCHANGE_LOOKUP_ID, -2, 'NO_CACHE', MD_DURABLE_KEY, MD_DURABLE_KEY, MD_SURROGATE_KEY, PK_EXCHANGE_ID) "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_SURROGATE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.PK_EXCHANGE_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_UPDATE "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID&#x9;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="lookup(DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, PK_EXCHANGE_LOOKUP_ID, -2, 'NO_CACHE', MD_DURABLE_KEY, MD_DURABLE_KEY, MD_SURROGATE_KEY, PK_EXCHANGE_ID) " >
<FUNCTION_CALL name="lookup"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<COLUMN_REFERENCE  column="PK_EXCHANGE_LOOKUP_ID" />
<CONSTANT value="-2" datatype="INT" />
<CONSTANT value="NO_CACHE" datatype="VARCHAR" size="8" />
<COLUMN_REFERENCE  column="MD_DURABLE_KEY" />
<COLUMN_REFERENCE  column="MD_DURABLE_KEY" />
<COLUMN_REFERENCE  column="MD_SURROGATE_KEY" />
<COLUMN_REFERENCE  column="PK_EXCHANGE_ID" />
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.PK_EXCHANGE_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="PK_EXCHANGE_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_UPDATE" >
<VARIABLE_REFERENCE name="$G_FLAG_UPDATE" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_DIM_XFRU" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRU" >
<DIOutputView name="EXCHANGE_DIM_XFRU"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<DIInputView name="QRY_UPD"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>write_data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="EXCHANGE_KEY_LOOKUP_NEW_WF" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The workflow {TARGET DIMENSION NAME}_LOOKUP_WF is the workflow responsible for loading dimension keys that are generated into the table DIMENSIONKEY_LOOKUP.  The workflow will be composed of the following objects:&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_TRY . The beginning of the TRY/CATCH block in Data Services&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_START_SC . The script that calls the custom function that initiates the metadata tracking for the workflow. The script also calls the custom function that creates pseudo surrogate key record. &#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_DEL_DF . The dataflow that is based on the incoming _XFRD load ready target staging tables to query the DIMENSIONKEY_LOOKUP table with the records to delete and Map all rows as Normal for deletion.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_UPD_DF . The dataflow that is based on the incoming _XFRU load ready target staging tables to query based on the durable key field and post updates to DIMENSIONKEY_LOOKUP table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_NEW_DF . The dataflow that is based on the incoming _XFRN load ready target staging tables to populate the dimension name, durable and surrogate key fields for new records to the DIMENSIONKEY_LOOKUP table. This table is then used as a lookup table for the fact table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_END_SC . The script that calls the custom function that closes the metadata for the workflow.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_CATCH . The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_IDENTIFIER" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_MAX_WF_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_NEW_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_NEW_START_SC"/>
<DIAttribute name="ui_script_text" value="#WORKFLOW NAME&#xD;&#xA;$L_WF_NAME = workflow_name();&#xD;&#xA;&#xD;&#xA;# GET MAX PROCESS_ID OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID&#xD;&#xA;$L_MAX_WF_PROCESS_ID=M_ICPS_GET_MAX_WF_PROCESS_ID($G_BATCH_ID,$L_WF_NAME,job_name( ));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# GET LAST EXECUTION STATUS OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID, ACCORDING TO MAX PROCESS_ID&#xD;&#xA;$L_LATEST_WF_STATUS =M_ICPS_GET_WF_STATUS($L_MAX_WF_PROCESS_ID,$L_WF_NAME );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="workflow_name()" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_MAX_WF_PROCESS_ID" >
<DIExpression isString="true" expr="m_icps_get_max_wf_process_id($G_BATCH_ID, $L_WF_NAME, job_name())" >
<FUNCTION_CALL name="m_icps_get_max_wf_process_id"  type="DI" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<FUNCTION_CALL name="job_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LATEST_WF_STATUS" >
<DIExpression isString="true" expr="m_icps_get_wf_status($L_MAX_WF_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="m_icps_get_wf_status"  type="DI" >
<VARIABLE_REFERENCE name="$L_MAX_WF_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DIIfStep typeId="2" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="If_condition" value="$L_LATEST_WF_STATUS&lt;&gt;'SUCCESS'  or $L_LATEST_WF_STATUS is null"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_NEW_CONDITION"/>
</DIUIOptions>
<DIExpression isString="true" expr="(($L_LATEST_WF_STATUS != 'SUCCESS') OR&#xA;   ($L_LATEST_WF_STATUS IS  NULL ))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_KEY_LOOKUP_NEW_DF" >
</DICallStep>
</DIIf>
<DIElse>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="PRINT"/>
<DIAttribute name="ui_script_text" value="ETL_PRINT('PREVIOS RUN OF WORKFLOW &gt;&gt; '||$L_WF_NAME||' FOR BATCH ID &gt;&gt; '||$G_BATCH_ID||' HAS FINISHED SUCCESSFULLY!');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('PREVIOS RUN OF WORKFLOW &gt;&gt; ' || $L_WF_NAME) || ' FOR BATCH ID &gt;&gt; ') || $G_BATCH_ID) || ' HAS FINISHED SUCCESSFULLY!'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="PREVIOS RUN OF WORKFLOW &gt;&gt; " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</CONCAT>
<CONSTANT value=" FOR BATCH ID &gt;&gt; " datatype="VARCHAR" size="17" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</CONCAT>
<CONSTANT value=" HAS FINISHED SUCCESSFULLY!" datatype="VARCHAR" size="27" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DIElse>
</DIIfStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom end workflow function.  This script closes the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_NEW_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_NEW_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script is called upon the failure of the workflow"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_KEY_LOOKUP_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_KEY_LOOKUP_NEW_DF" typeId="1" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="Populate the dimension name, durable and surrogate key fields for new records from the XFRN staging table to the EXCHANGE_KEY_LOOKUP table. This table is then used as a lookup table for the fact table "/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The dataflow that is based on the incoming _XFRN load ready target staging tables to populate the dimension name, durable and surrogate key fields for new records to the DIMENSIONKEY_LOOKUP table. This table is then used as a lookup table for the fact table."/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Perform lookup on the ID field to see if it already exists, otherwise it is marked with value of 2. Then based on that value in the Case transform, map as either a New record or New SCD2 (update) record"/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_DIM_XFRN"/>
<DIAttribute name="ui_display_name" value="QRY_LKUP"/>
</DIUIOptions>
<DISchema name="QRY_LKUP" >
<DIElement name="PK_EXCHANGE_LOOKUP_ID" datatype="INT" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="lookup(DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, PK_EXCHANGE_LOOKUP_ID, -2, 'NO_CACHE', MD_DURABLE_KEY, MD_DURABLE_KEY)"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_SURROGATE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.PK_EXCHANGE_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_CREATEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_LASTMODDATE"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="lookup(DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, PK_EXCHANGE_LOOKUP_ID, -2, 'NO_CACHE', MD_DURABLE_KEY, MD_DURABLE_KEY) " >
<FUNCTION_CALL name="lookup"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<COLUMN_REFERENCE  column="PK_EXCHANGE_LOOKUP_ID" />
<CONSTANT value="-2" datatype="INT" />
<CONSTANT value="NO_CACHE" datatype="VARCHAR" size="8" />
<COLUMN_REFERENCE  column="MD_DURABLE_KEY" />
<COLUMN_REFERENCE  column="MD_DURABLE_KEY" />
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.PK_EXCHANGE_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="PK_EXCHANGE_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_CREATEDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_CREATEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_LASTMODDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_LASTMODDATE" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_DIM_XFRN" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>


<!-- GUID is optional -->
<DITransformCall typeId="210" name="Case_Operation"  >
<DIUIOptions>
<DIAttribute name="CS_EXISTING_LKUP_ID_CS_NEW" value="QRY_LKUP.PK_EXCHANGE_LOOKUP_ID = -2"/>
<DIAttribute name="CS_EXISTING_LKUP_ID_CS_SCD2" value="QRY_LKUP.PK_EXCHANGE_LOOKUP_ID &lt;&gt; -2"/>
<DIAttribute name="ObjectDesc" value="Check to see if the incoming id already exists in the DIMENSIONKEY LOOKUP table."/>
<DIAttribute name="ui_acta_from_schema_0" value="QRY_LKUP"/>
<DIAttribute name="ui_display_name" value="CS_EXISTING_LKUP_ID"/>
</DIUIOptions>
<DIInputView name="QRY_LKUP" />
<DISchema name="CS_EXISTING_LKUP_ID" >
</DISchema>
<DICase>
<DISwitch label="CS_NEW" outputView="CS_EXISTING_LKUP_ID_CS_NEW" isDefault="false">
<DIExpression isString="true" expr="(QRY_LKUP.PK_EXCHANGE_LOOKUP_ID = -2)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="QRY_LKUP" column="PK_EXCHANGE_LOOKUP_ID" />
<CONSTANT value="-2" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="CS_SCD2" outputView="CS_EXISTING_LKUP_ID_CS_SCD2" isDefault="false">
<DIExpression isString="true" expr="(QRY_LKUP.PK_EXCHANGE_LOOKUP_ID != -2)" >
<LOGICAL_OP op="NE">
<COLUMN_REFERENCE  qualifier1="QRY_LKUP" column="PK_EXCHANGE_LOOKUP_ID" />
<CONSTANT value="-2" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
</DICase>
<DIAttributes>
<DIAttribute name="Mutually_Exclusive" value="yes"/>
<DIAttribute name="Preserve_Expression_Order" value="no"/>
</DIAttributes>
</DITransformCall>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Populate the dimension name, durable and surrogate key fields for new records from the XFRN staging table to the DIMENSIONKEY_LOOKUP table."/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_EXISTING_LKUP_ID_CS_NEW"/>
<DIAttribute name="ui_display_name" value="QRY_NEW"/>
</DIUIOptions>
<DISchema name="QRY_NEW" >
<DIElement name="PK_EXCHANGE_LOOKUP_ID" datatype="INT" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="greatest(5+gen_row_num(),key_generation('DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP', 'PK_EXCHANGE_LOOKUP_ID', 1))"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_EXISTING_LKUP_ID_CS_NEW.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_SURROGATE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_EXISTING_LKUP_ID_CS_NEW.MD_SURROGATE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_NEW "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="null"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="greatest((5 + gen_row_num()), key_generation(DWSTAGING_DS.DWSTAGING_ALIAS.EXCHANGE_KEY_LOOKUP, 'PK_EXCHANGE_LOOKUP_ID', 1) )" >
<FUNCTION_CALL name="greatest"  type="DI" >
<ADD>
<CONSTANT value="5" datatype="INT" />
<FUNCTION_CALL name="gen_row_num"  type="DI" />
</ADD>
<FUNCTION_CALL name="key_generation"  type="DI" tableDatastore="DWSTAGING_DS" tableOwner="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<CONSTANT value="PK_EXCHANGE_LOOKUP_ID" datatype="VARCHAR" size="21" />
<CONSTANT value="1" datatype="INT" />
</FUNCTION_CALL>
</FUNCTION_CALL>
</DIExpression>
<DIExpression isString="true" expr="CS_EXISTING_LKUP_ID_CS_NEW.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_EXISTING_LKUP_ID_CS_NEW" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_EXISTING_LKUP_ID_CS_NEW.MD_SURROGATE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_EXISTING_LKUP_ID_CS_NEW" column="MD_SURROGATE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_NEW" >
<VARIABLE_REFERENCE name="$G_FLAG_NEW" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_EXISTING_LKUP_ID_CS_NEW" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Query for only SCD2 records and update the target table."/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_EXISTING_LKUP_ID_CS_SCD2"/>
<DIAttribute name="ui_display_name" value="QRY_SCD2"/>
</DIUIOptions>
<DISchema name="QRY_SCD2" >
<DIElement name="PK_EXCHANGE_LOOKUP_ID" datatype="INT" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_EXISTING_LKUP_ID_CS_SCD2.PK_EXCHANGE_LOOKUP_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_EXISTING_LKUP_ID_CS_SCD2.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_SURROGATE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_EXISTING_LKUP_ID_CS_SCD2.MD_SURROGATE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_FLAG_UPDATE "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_MODDATE_LOC "/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="CS_EXISTING_LKUP_ID_CS_SCD2.PK_EXCHANGE_LOOKUP_ID" >
<COLUMN_REFERENCE  qualifier1="CS_EXISTING_LKUP_ID_CS_SCD2" column="PK_EXCHANGE_LOOKUP_ID" />
</DIExpression>
<DIExpression isString="true" expr="CS_EXISTING_LKUP_ID_CS_SCD2.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_EXISTING_LKUP_ID_CS_SCD2" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_EXISTING_LKUP_ID_CS_SCD2.MD_SURROGATE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_EXISTING_LKUP_ID_CS_SCD2" column="MD_SURROGATE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="$G_FLAG_UPDATE" >
<VARIABLE_REFERENCE name="$G_FLAG_UPDATE" />
</DIExpression>
<DIExpression isString="true" expr="$G_MODDATE_LOC" >
<VARIABLE_REFERENCE name="$G_MODDATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_EXISTING_LKUP_ID_CS_SCD2" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRN" >
<DIOutputView name="EXCHANGE_DIM_XFRN"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<DIInputView name="QRY_NEW"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>yes</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>no</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>write_data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_KEY_LOOKUP" >
<DIInputView name="QRY_SCD2"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>write_data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_XFR_UPDATE_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_XFRN_UPDATE_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_XFRN_UPDATE_WF" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The workflow {TARGET DIMENSION NAME}_LOOKUP_WF is the workflow responsible for loading dimension keys that are generated into the table DIMENSIONKEY_LOOKUP.  The workflow will be composed of the following objects:&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_TRY . The beginning of the TRY/CATCH block in Data Services&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_START_SC . The script that calls the custom function that initiates the metadata tracking for the workflow. The script also calls the custom function that creates pseudo surrogate key record. &#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_DEL_DF . The dataflow that is based on the incoming _XFRD load ready target staging tables to query the DIMENSIONKEY_LOOKUP table with the records to delete and Map all rows as Normal for deletion.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_UPD_DF . The dataflow that is based on the incoming _XFRU load ready target staging tables to query based on the durable key field and post updates to DIMENSIONKEY_LOOKUP table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_NEW_DF . The dataflow that is based on the incoming _XFRN load ready target staging tables to populate the dimension name, durable and surrogate key fields for new records to the DIMENSIONKEY_LOOKUP table. This table is then used as a lookup table for the fact table.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_END_SC . The script that calls the custom function that closes the metadata for the workflow.&#xD;&#xA; {TARGET DIMENSION NAME}_LOOKUP_CATCH . The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_IDENTIFIER" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFRN_UPDATE_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFRN_UPDATE_START_SC"/>
<DIAttribute name="ui_script_text" value="ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_XFRN_UPDATE_DF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom end workflow function.  This script closes the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFRN_UPDATE_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFRN_UPDATE_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script is called upon the failure of the workflow"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_XFRN_UPDATE_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_XFRN_UPDATE_DF" typeId="1" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This dataflow performs a lookup on the &lt;entity&gt;_KEY_LOOKUP table to get the surrogate key, given/using the incoming ENTERPRISE_KEY found for the ID fields in the previous step."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_XFR_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:26:21"/>
<DIAttribute name="Description" value="The dataflow that sources the _XFRN staging table and finds the surrogate key in the KEY_LOOKUP table to populate the _ID fields."/>
</DIProperties>
<DITransforms>
<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRN" >
<DIOutputView name="EXCHANGE_DIM_XFRN"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Perform lookup on the &lt;entity&gt; KEY_LOOKUP table to get the surrogate key"/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_DIM_XFRN"/>
<DIAttribute name="ui_display_name" value="QRY_LOOKUP_SURROGATE_KEY"/>
</DIUIOptions>
<DISchema name="QRY_LOOKUP_SURROGATE_KEY" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_ACTIVESTATUSIND"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_CREATEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_DELETEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_LASTMODDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_TRANSENDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.MD_TRANSLASTIND"/>
</DIAttributes>
</DIElement>
<DIElement name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.PK_EXCHANGE_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRN.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_BATCH_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_PROCESS_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_ACTIVESTATUSIND" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_ACTIVESTATUSIND" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_CREATEDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_CREATEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_DELETEDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_DELETEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_LASTMODDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_LASTMODDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_TRANSENDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_TRANSENDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.MD_TRANSLASTIND" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="MD_TRANSLASTIND" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.PK_EXCHANGE_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="PK_EXCHANGE_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="END_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRN.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRN" column="EXCHANGE_RATE" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_DIM_XFRN" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Map records as update"/>
<DIAttribute name="ui_display_name" value="MO_NORMAL_TO_UPDATE"/>
</DIUIOptions>
<DIInputView name="QRY_LOOKUP_SURROGATE_KEY"  />
<DISchema name="MO_NORMAL_TO_UPDATE" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="discard"/>
<DIAttribute name="normal" value="update"/>
<DIAttribute name="update" value="discard"/>
</DIAttributes>
</DITransformCall>
<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRN" >
<DIInputView name="MO_NORMAL_TO_UPDATE"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>no</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_DW_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_DIM_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_DIM_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow was created in order to house the dimension workflows that push the load ready Dimension XFR tables into the target dimension tables. These workflows are processed in serial; the deletions are first updated in the target with history information, then the updates for SCD1 and SCD2, then the new records are added to the target."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:27:20"/>
<DIAttribute name="Description" value="This workflow was created in order to house the dimension workflows that push the load ready XFR tables into the target dimension tables. These workflows are processed in serial; the deletions are first updated in the target with history information, then the updates for SCD1 and SCD2, then the new records are added to the target."/>
</DIProperties>
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_DIM_DEL_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_DIM_UPD_SCD1_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_DIM_UPD_SCD2_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_DIM_NEW_WF" >
</DICallStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_DIM_DEL_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow loads records from the XFRD table and updates the existing record in the dimension table with deleted history information. The MD BATCH ID and MD PROCESS ID fields are pulled directly from the source"/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:27:20"/>
<DIAttribute name="Description" value="The workflow {Target}_DIM_DEL_WF is the workflow responsible for sourcing the records in the XFRD table and updating the existing record in the DIM table with the deleted history information. The workflow will be composed of the following objects:&#xA;&#x9;{Target}_DIM_DEL_TRY - The beginning of the TRY/CATCH block in Data Integrator&#xA;&#x9;{Target}_DIM_DEL_START_SC - The script that calls the custom function that initiates the metadata tracking for the workflow.&#xA;&#x9;{Target}_DIM_DEL_DF - The dataflow that pulls all records flagged as inserts and checks to see if the business key exists in {Target}_ENTERPRISE_XREF table.  If the business key does not exist it is added with a newly generated ENTERPRISE_KEY.&#xA;&#x9;{Target}_DIM_DEL_END_SC - The script that calls the custom function that closes the metadata for the workflow.&#xA;&#x9;{Target}_DIM_DEL_CATCH - The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_DEL_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_DEL_START_SC"/>
<DIAttribute name="ui_script_text" value="ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_DIM_DEL_DF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object that calls the custom end workflow function.  This script closes the metadata records that are part of this process."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_DEL_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_DEL_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_DIM_DEL_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="The dataflow is responsible for sourcing the records in the XFRD table and updating the existing record in the DIM table with the deleted history information"/>
</DIProperties>
<DITransforms>
<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRD" >
<DIOutputView name="EXCHANGE_DIM_XFRD"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="EXCHANGE_DIM" >
<DIInputView name="EXCHANGE_DIM_XFRD"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="EXCHANGE_DIM_UPD_SCD1_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow loads SCD1 records from the XFRU table and updates the existing record in the dimension table with update history information. The MD BATCH ID and MD PROCESS ID fields are pulled directly from the source"/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:27:20"/>
<DIAttribute name="Description" value="The workflow {Target}_DIM_UPD_SCD1_WF is the workflow responsible for sourcing the XFRU table for SCD1 records and updating the existing record in the DIM table with the update history information. The workflow will be composed of the following objects:&#xA;&#x9;{Target}_DIM_UPD_SCD1_TRY - The beginning of the TRY/CATCH block in Data Integrator&#xA;&#x9;{Target}_DIM_UPD_SCD1_START_SC - The script that calls the custom function that initiates the metadata tracking for the workflow.&#xA;&#x9;{Target}_DIM_UPD_SCD1_DF - The dataflow that pulls SCD1 records from XFRU and update the record in the target dimension.&#xA;&#x9;{Target}_DIM_UPD_SCD1_END_SC - The script that calls the custom function that closes the metadata for the workflow.&#xA;&#x9;{Target}_DIM_UPD_SCD1_CATCH - The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD1_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD1_START_SC"/>
<DIAttribute name="ui_script_text" value="ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_DIM_UPD_SCD1_DF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object that calls the custom end workflow function.  This script closes the metadata records that are part of this process."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD1_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD1_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_DIM_UPD_SCD1_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="The dataflow is responsible for sourcing the records in the XFRU table that are type SCD1 and updating the existing record in the DIM table with the update history information"/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Only records marked as SCD1 or TRANSLASTIND = 'Y' are sourced from the XFRU table. MD Batch ID and MD Process ID are directly pulled from the source."/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_DIM_XFRU"/>
<DIAttribute name="ui_display_name" value="QRY_SCD1"/>
<DIAttribute name="ui_where_text" value="(EXCHANGE_DIM_XFRU.MD_TRANSLASTIND = 'Y')"/>
</DIUIOptions>
<DISchema name="QRY_SCD1" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_ACTIVESTATUSIND"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_DELETEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_LASTMODDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_TRANSENDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_TRANSLASTIND"/>
</DIAttributes>
</DIElement>
<DIElement name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.PK_EXCHANGE_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_BATCH_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_PROCESS_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_ACTIVESTATUSIND" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_ACTIVESTATUSIND" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_DELETEDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_DELETEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_LASTMODDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_LASTMODDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_TRANSENDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_TRANSENDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_TRANSLASTIND" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_TRANSLASTIND" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.PK_EXCHANGE_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="PK_EXCHANGE_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_DIM_XFRU" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(EXCHANGE_DIM_XFRU.MD_TRANSLASTIND = 'Y')" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_TRANSLASTIND" />
<CONSTANT value="Y" datatype="VARCHAR" size="1" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRU" >
<DIOutputView name="EXCHANGE_DIM_XFRU"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="EXCHANGE_DIM" >
<DIInputView name="QRY_SCD1"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>No</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="EXCHANGE_DIM_UPD_SCD2_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow loads the SCD2 records from the XFRU table and updates the existing record in the dimension table. The MD BATCH ID and MD PROCESS ID fields are pulled directly from the source"/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:27:20"/>
<DIAttribute name="Description" value="The workflow {Target}_DIM_UPD_SCD2_WF is the workflow responsible for sourcing the records in the XFRD table and updating the existing record in the DIM table with the deleted history information. The workflow will be composed of the following objects:&#xA;&#x9;{Target}_DIM_UPD_SCD2_TRY - The beginning of the TRY/CATCH block in Data Integrator&#xA;&#x9;{Target}_DIM_UPD_SCD2_START_SC - The script that calls the custom function that initiates the metadata tracking for the workflow.&#xA;&#x9;{Target}_DIM_UPD_SCD2_DF - The dataflow that pulls SCD2 records from XFRU and updates the record in the target dimension.&#xA;&#x9;{Target}_DIM_UPD_SCD2_END_SC - The script that calls the custom function that closes the metadata for the workflow.&#xA;&#x9;{Target}_DIM_UPD_SCD2_CATCH - The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD2_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD2_START_SC"/>
<DIAttribute name="ui_script_text" value="ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_DIM_UPD_SCD2_DF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object that calls the custom end workflow function.  This script closes the metadata records that are part of this process."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD2_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_UPD_SCD2_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_DIM_UPD_SCD2_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="The dataflow is responsible for sourcing the records in the XFRD table and updating the existing record in the DIM table with the deleted history information"/>
</DIProperties>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Only records marked as SCD2 or TRANSLASTIND = 'N' are sourced from the XFRU table."/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_DIM_XFRU"/>
<DIAttribute name="ui_display_name" value="QRY_SCD2"/>
<DIAttribute name="ui_where_text" value="(EXCHANGE_DIM_XFRU.MD_TRANSLASTIND = 'N')"/>
</DIUIOptions>
<DISchema name="QRY_SCD2" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_ACTIVESTATUSIND"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_CREATEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_DELETEDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_DURABLE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_LASTMODDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_TRANSENDDATE"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.MD_TRANSLASTIND"/>
</DIAttributes>
</DIElement>
<DIElement name="PK_EXCHANGE_ID" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.PK_EXCHANGE_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="EXCHANGE_DIM_XFRU.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_BATCH_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_PROCESS_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_ACTIVESTATUSIND" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_ACTIVESTATUSIND" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_CREATEDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_CREATEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_DELETEDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_DELETEDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_DURABLE_KEY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_DURABLE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_LASTMODDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_LASTMODDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_TRANSENDDATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_TRANSENDDATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.MD_TRANSLASTIND" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_TRANSLASTIND" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.PK_EXCHANGE_ID" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="PK_EXCHANGE_ID" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="EXCHANGE_DIM_XFRU.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="EXCHANGE_DIM_XFRU" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(EXCHANGE_DIM_XFRU.MD_TRANSLASTIND = 'N')" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_DIM_XFRU" column="MD_TRANSLASTIND" />
<CONSTANT value="N" datatype="VARCHAR" size="1" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRU" >
<DIOutputView name="EXCHANGE_DIM_XFRU"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="EXCHANGE_DIM" >
<DIInputView name="QRY_SCD2"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="EXCHANGE_DIM_NEW_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow loads records from the XFRN table and adds the new record into the dimension table. The MD BATCH ID and MD PROCESS ID fields are pulled directly from the source."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_DIM_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:27:20"/>
<DIAttribute name="Description" value="The workflow {Target}_DIM_NEW_WF is the workflow responsible for sourcing the records in the XFRN table and adding the new records into the DIM table. The workflow will be composed of the following objects:&#xA;&#x9;{Target}_DIM_NEW_TRY - The beginning of the TRY/CATCH block in Data Integrator&#xA;&#x9;{Target}_DIM_NEW_START_SC - The script that calls the custom function that initiates the metadata tracking for the workflow.&#xA;&#x9;{Target}_DIM_NEW_DF - The dataflow that pulls all new records from the XFRN table and adds them to the target dimension.&#xA;&#x9;{Target}_DIM_NEW_END_SC - The script that calls the custom function that closes the metadata for the workflow.&#xA;&#x9;{Target}_DIM_NEW_CATCH - The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$l_counter" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_MAX_WF_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="the Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_NEW_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object which contains the script to call the custom start workflow function.  This script opens the metadata records that are part of this process"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_NEW_START_SC"/>
<DIAttribute name="ui_script_text" value="#WORKFLOW NAME&#xD;&#xA;$L_WF_NAME = workflow_name();&#xD;&#xA;&#xD;&#xA;# GET MAX PROCESS_ID OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID&#xD;&#xA;$L_MAX_WF_PROCESS_ID=M_ICPS_GET_MAX_WF_PROCESS_ID($G_BATCH_ID,$L_WF_NAME,job_name( ));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# GET LAST EXECUTION STATUS OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID, ACCORDING TO MAX PROCESS_ID&#xD;&#xA;$L_LATEST_WF_STATUS =M_ICPS_GET_WF_STATUS($L_MAX_WF_PROCESS_ID,$L_WF_NAME );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="workflow_name()" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_MAX_WF_PROCESS_ID" >
<DIExpression isString="true" expr="m_icps_get_max_wf_process_id($G_BATCH_ID, $L_WF_NAME, job_name())" >
<FUNCTION_CALL name="m_icps_get_max_wf_process_id"  type="DI" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<FUNCTION_CALL name="job_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LATEST_WF_STATUS" >
<DIExpression isString="true" expr="m_icps_get_wf_status($L_MAX_WF_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="m_icps_get_wf_status"  type="DI" >
<VARIABLE_REFERENCE name="$L_MAX_WF_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DIIfStep typeId="2" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="If_condition" value="$L_LATEST_WF_STATUS&lt;&gt;'SUCCESS'  or $L_LATEST_WF_STATUS is null"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_NEW_CONDITION"/>
</DIUIOptions>
<DIExpression isString="true" expr="(($L_LATEST_WF_STATUS != 'SUCCESS') OR&#xA;   ($L_LATEST_WF_STATUS IS  NULL ))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_DIM_NEW_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_LATEST_WF_STATUS" >
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</DIExpression>
</DIParameterValues>
</DICallStep>
</DIIf>
<DIElse>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="Print"/>
<DIAttribute name="ui_script_text" value="ETL_PRINT('PREVIOS RUN OF WORKFLOW &gt;&gt; '||$L_WF_NAME||' FOR BATCH ID &gt;&gt; '||$G_BATCH_ID||' HAS FINISHED SUCCESSFULLY!');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('PREVIOS RUN OF WORKFLOW &gt;&gt; ' || $L_WF_NAME) || ' FOR BATCH ID &gt;&gt; ') || $G_BATCH_ID) || ' HAS FINISHED SUCCESSFULLY!'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="PREVIOS RUN OF WORKFLOW &gt;&gt; " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</CONCAT>
<CONSTANT value=" FOR BATCH ID &gt;&gt; " datatype="VARCHAR" size="17" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</CONCAT>
<CONSTANT value=" HAS FINISHED SUCCESSFULLY!" datatype="VARCHAR" size="27" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DIElse>
</DIIfStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The workflow script object that calls the custom end workflow function.  This script closes the metadata records that are part of this process."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_NEW_END_SC"/>
<DIAttribute name="ui_script_text" value="# collect DIMENSIONAL statistics&#xD;&#xA;$l_counter = sql('DW_DS',&#xD;&#xA;      'SELECT count(*) FROM EXCHANGE_DIM where MD_BATCH_ID = {$G_BATCH_ID}');&#xD;&#xA;ABC_ADDAUDITMEASURE_FN($G_PROCESS_ID, workflow_name(), 'DIMENSIONAL_UPDATES',$l_counter , 'INT', 'volume check', 'number of changes (includes NEW, UPDATES and DELETES)');&#xD;&#xA;&#xD;&#xA;ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$l_counter" >
<DIExpression isString="true" expr="sql('DW_DS', 'SELECT count(*) FROM EXCHANGE_DIM where MD_BATCH_ID = {$G_BATCH_ID}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_DS" datatype="VARCHAR" size="5" />
<CONSTANT value="SELECT count(*) FROM EXCHANGE_DIM where MD_BATCH_ID = {$G_BATCH_ID}" datatype="VARCHAR" size="67" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_addauditmeasure_fn($G_PROCESS_ID, workflow_name(), 'DIMENSIONAL_UPDATES', $l_counter, 'INT', 'volume check', 'number of changes (includes NEW, UPDATES and DELETES)')" >
<FUNCTION_CALL name="abc_addauditmeasure_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<FUNCTION_CALL name="workflow_name"  type="DI" />
<CONSTANT value="DIMENSIONAL_UPDATES" datatype="VARCHAR" size="19" />
<VARIABLE_REFERENCE name="$l_counter" />
<CONSTANT value="INT" datatype="VARCHAR" size="3" />
<CONSTANT value="volume check" datatype="VARCHAR" size="12" />
<CONSTANT value="number of changes (includes NEW, UPDATES and DELETES)" datatype="VARCHAR" size="53" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block will contain the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_NEW_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="EXCHANGE_DIM_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_DIM_NEW_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="The dataflow is responsible for sourcing the records in the XFRN table and adding the new record into the DIM table"/>
</DIProperties>
<DIParameters>
<DIElement paramType="IN" name="$P_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIParameters>
<DITransforms>
<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_DIM_XFRN" >
<DIOutputView name="EXCHANGE_DIM_XFRN"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="EXCHANGE_DIM" >
<DIInputView name="CASE_LOAD_FIRST_RUN"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>Yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>Yes</loader_auto_correct>
                <loader_bulk_load>1</loader_bulk_load>
                <loader_compare_column>Compare by name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>No</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>Yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>No</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>


<!-- GUID is optional -->
<DITransformCall typeId="210" name="Case_Operation"  >
<DIUIOptions>
<DIAttribute name="CASE_LOAD_FIRST_RUN" value="$P_LATEST_WF_STATUS IS NULL and ($G_DEBUG_MODE &lt;&gt;1 or $G_DEBUG_MODE IS NULL) and ($G_TRACE_MODE &lt;&gt;1 or $G_TRACE_MODE IS NULL)"/>
<DIAttribute name="CASE_LOAD_RE_RUN" value="DEFAULT"/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_DIM_XFRN"/>
<DIAttribute name="ui_display_name" value="CASE_LOAD"/>
</DIUIOptions>
<DIInputView name="EXCHANGE_DIM_XFRN" />
<DISchema name="CASE_LOAD" >
</DISchema>
<DICase>
<DISwitch label="FIRST_RUN" outputView="CASE_LOAD_FIRST_RUN" isDefault="false">
<DIExpression isString="true" expr="((($P_LATEST_WF_STATUS IS  NULL ) AND&#xA;   (  (($G_DEBUG_MODE != 1) OR&#xA;   ($G_DEBUG_MODE IS  NULL ))  )) AND&#xA;   (  (($G_TRACE_MODE != 1) OR&#xA;   ($G_TRACE_MODE IS  NULL ))  ))" >
<LOGICAL_OP op="AND">
<LOGICAL_OP op="AND">
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$P_LATEST_WF_STATUS" />
</LOGICAL_OP>
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$G_DEBUG_MODE" />
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$G_DEBUG_MODE" />
</LOGICAL_OP>
</LOGICAL_OP>
</LOGICAL_OP>
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$G_TRACE_MODE" />
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$G_TRACE_MODE" />
</LOGICAL_OP>
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="RE_RUN" outputView="CASE_LOAD_RE_RUN" isDefault="true">
</DISwitch>
</DICase>
<DIAttributes>
<DIAttribute name="Mutually_Exclusive" value="yes"/>
<DIAttribute name="Preserve_Expression_Order" value="no"/>
</DIAttributes>
</DITransformCall>
<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="EXCHANGE_DIM" >
<DIInputView name="CASE_LOAD_RE_RUN"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>yes</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>no</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_CSNP_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="EXCHANGE_CSNP_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="EXCHANGE_CSNP_WF" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_CSNP_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:27:21"/>
<DIAttribute name="Description" value="This workflow loads the data from the MSC tables into the CSNP tables."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_MAX_WF_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The beginning of the TRY/CATCH block in Data Integrator"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_CSNP_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_CSNP_START_SC"/>
<DIAttribute name="ui_script_text" value="&#xD;&#xA;#WORKFLOW NAME&#xD;&#xA;$L_WF_NAME = workflow_name();&#xD;&#xA;&#xD;&#xA;# GET MAX PROCESS_ID OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID&#xD;&#xA;$L_MAX_WF_PROCESS_ID=M_ICPS_GET_MAX_WF_PROCESS_ID($G_BATCH_ID,$L_WF_NAME,job_name( ));&#xD;&#xA;&#xD;&#xA;# GET LAST EXECUTION STATUS OF THIS WORKFLOW IN THE SCOPE OF RUNNING BATCH_ID, ACCORDING TO MAX PROCESS_ID&#xD;&#xA;$L_LATEST_WF_STATUS =M_ICPS_GET_WF_STATUS($L_MAX_WF_PROCESS_ID,$L_WF_NAME );&#xD;&#xA;&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="workflow_name()" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_MAX_WF_PROCESS_ID" >
<DIExpression isString="true" expr="m_icps_get_max_wf_process_id($G_BATCH_ID, $L_WF_NAME, job_name())" >
<FUNCTION_CALL name="m_icps_get_max_wf_process_id"  type="DI" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<FUNCTION_CALL name="job_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_LATEST_WF_STATUS" >
<DIExpression isString="true" expr="m_icps_get_wf_status($L_MAX_WF_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="m_icps_get_wf_status"  type="DI" >
<VARIABLE_REFERENCE name="$L_MAX_WF_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DIIfStep typeId="2" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="If_condition" value="$L_LATEST_WF_STATUS&lt;&gt;'SUCCESS'  or $L_LATEST_WF_STATUS is null"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_CSNP_CONDITION"/>
</DIUIOptions>
<DIExpression isString="true" expr="(($L_LATEST_WF_STATUS != 'SUCCESS') OR&#xA;   ($L_LATEST_WF_STATUS IS  NULL ))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="EXCHANGE_CSNP_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_LATEST_WF_STATUS" >
<VARIABLE_REFERENCE name="$L_LATEST_WF_STATUS" />
</DIExpression>
</DIParameterValues>
</DICallStep>
</DIIf>
<DIElse>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="Print"/>
<DIAttribute name="ui_script_text" value="ETL_PRINT('PREVIOS RUN OF WORKFLOW &gt;&gt; '||$L_WF_NAME||' FOR BATCH ID &gt;&gt; '||$G_BATCH_ID||' HAS FINISHED SUCCESSFULLY!');"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('PREVIOS RUN OF WORKFLOW &gt;&gt; ' || $L_WF_NAME) || ' FOR BATCH ID &gt;&gt; ') || $G_BATCH_ID) || ' HAS FINISHED SUCCESSFULLY!'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="PREVIOS RUN OF WORKFLOW &gt;&gt; " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</CONCAT>
<CONSTANT value=" FOR BATCH ID &gt;&gt; " datatype="VARCHAR" size="17" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</CONCAT>
<CONSTANT value=" HAS FINISHED SUCCESSFULLY!" datatype="VARCHAR" size="27" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DIElse>
</DIIfStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that closes the metadata for the workflow."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_CSNP_END_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The end of the TRY/CATCH block.  It contains the script that calls the custom function which writes metadata if there is a failure."/>
<DIAttribute name="ui_display_name" value="EXCHANGE_CSNP_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Script called upon if there is a failure in the workflow"/>
<DIAttribute name="ui_display_name" value="EXCHANGE_CSNP_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="EXCHANGE_CSNP_DF" typeId="1" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="Description: This dataflow sources records from the MSC to CSNP tables. Records flagged as delete (from MSC) are physically removed from CSNP."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_CSNP_WF (version ${project.version})"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Wed, 6 Apr 2011 15:27:21"/>
<DIAttribute name="Description" value="Process the records from MSC to CSNP"/>
</DIProperties>
<DIParameters>
<DIElement paramType="IN" name="$P_LATEST_WF_STATUS" datatype="VARCHAR" size="200" >
</DIElement>
</DIParameters>
<DITransforms>
<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Flag records as  insert"/>
<DIAttribute name="ui_display_name" value="MO_Insert"/>
</DIUIOptions>
<DIInputView name="QRY_NEW"  />
<DISchema name="MO_Insert_1" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="discard"/>
<DIAttribute name="normal" value="insert"/>
<DIAttribute name="update" value="discard"/>
</DIAttributes>
</DITransformCall>
<DITransformCall typeId="111" name="Merge" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Merge records into target"/>
<DIAttribute name="ui_display_name" value="MRG"/>
</DIUIOptions>
<DIInputView name="MO_Delete_1"  />
<DIInputView name="MO_Insert_1"  />
<DIInputView name="MO_Update_1"  />
<DISchema name="MRG_1" >
</DISchema>
</DITransformCall>
<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Records flagged as deletes (MD_PF_FLAG='D') are physically deleted from CSNP"/>
<DIAttribute name="ui_display_name" value="MO_Delete"/>
</DIUIOptions>
<DIInputView name="QRY_Merge_Prepare"  />
<DISchema name="MO_Delete_1" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="discard"/>
<DIAttribute name="normal" value="delete"/>
<DIAttribute name="update" value="discard"/>
</DIAttributes>
</DITransformCall>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Records with MD_FLAG='DEL'"/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_MD_FLAG_CS_DEL"/>
<DIAttribute name="ui_display_name" value="QRY_Merge_Prepare"/>
<DIAttribute name="ui_where_text" value="(CS_MD_FLAG_CS_DEL.MD_FLAG = $G_FLAG_DELETE)"/>
</DIUIOptions>
<DISchema name="QRY_Merge_Prepare" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.MD_FLAG"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_DEL.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.MD_FLAG" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="MD_FLAG" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_DEL.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_MD_FLAG_CS_DEL" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(CS_MD_FLAG_CS_DEL.MD_FLAG = $G_FLAG_DELETE)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_DEL" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>


<!-- GUID is optional -->
<DITransformCall typeId="210" name="Case_Operation"  >
<DIUIOptions>
<DIAttribute name="CS_MD_FLAG_CS_DEL" value="EXCHANGE_MSC.MD_FLAG = $G_FLAG_DELETE "/>
<DIAttribute name="CS_MD_FLAG_CS_NEW" value="EXCHANGE_MSC.MD_FLAG = $G_FLAG_NEW "/>
<DIAttribute name="CS_MD_FLAG_CS_UPD" value="EXCHANGE_MSC.MD_FLAG = $G_FLAG_UPDATE "/>
<DIAttribute name="ObjectDesc" value="Check the value of the incoming MD_FLAG to determine the case statement to execute"/>
<DIAttribute name="ui_acta_from_schema_0" value="EXCHANGE_MSC"/>
<DIAttribute name="ui_display_name" value="CS_MD_FLAG"/>
</DIUIOptions>
<DIInputView name="EXCHANGE_MSC" />
<DISchema name="CS_MD_FLAG" >
</DISchema>
<DICase>
<DISwitch label="CS_NEW" outputView="CS_MD_FLAG_CS_NEW" isDefault="false">
<DIExpression isString="true" expr="(EXCHANGE_MSC.MD_FLAG = $G_FLAG_NEW)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_NEW" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="CS_UPD" outputView="CS_MD_FLAG_CS_UPD" isDefault="false">
<DIExpression isString="true" expr="(EXCHANGE_MSC.MD_FLAG = $G_FLAG_UPDATE)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_UPDATE" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="CS_DEL" outputView="CS_MD_FLAG_CS_DEL" isDefault="false">
<DIExpression isString="true" expr="(EXCHANGE_MSC.MD_FLAG = $G_FLAG_DELETE)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="EXCHANGE_MSC" column="MD_FLAG" />
<VARIABLE_REFERENCE name="$G_FLAG_DELETE" />
</LOGICAL_OP>
</DIExpression>
</DISwitch>
</DICase>
<DIAttributes>
<DIAttribute name="Mutually_Exclusive" value="yes"/>
<DIAttribute name="Preserve_Expression_Order" value="no"/>
</DIAttributes>
</DITransformCall>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Records with MD_FLAG='NEW'"/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_MD_FLAG_CS_NEW"/>
<DIAttribute name="ui_display_name" value="QRY_NEW"/>
</DIUIOptions>
<DISchema name="QRY_NEW" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.MD_FLAG"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_NEW.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.MD_FLAG" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="MD_FLAG" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_NEW.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_NEW" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_MD_FLAG_CS_NEW" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Records with MD_FLAG='UPD'"/>
<DIAttribute name="ui_acta_from_schema_0" value="CS_MD_FLAG_CS_UPD"/>
<DIAttribute name="ui_display_name" value="QRY_UPD"/>
</DIUIOptions>
<DISchema name="QRY_UPD" >
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BUSINESS_KEY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_BUSINESS_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_ENTERPRISE_KEY" datatype="DECIMAL" precision="18" scale="0" key="true" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_ENTERPRISE_KEY"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_FLAG" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.MD_FLAG"/>
</DIAttributes>
</DIElement>
<DIElement name="EXCHANGE_RATE" datatype="DOUBLE" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.EXCHANGE_RATE"/>
</DIAttributes>
</DIElement>
<DIElement name="SOURCE_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.SOURCE_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="PRIORITY" datatype="DECIMAL" precision="16" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.PRIORITY"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.START_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="START_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.START_DATE_UTC"/>
</DIAttributes>
</DIElement>
<DIElement name="TARGET_CURRENCY" datatype="VARCHAR" size="3" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.TARGET_CURRENCY"/>
</DIAttributes>
</DIElement>
<DIElement name="IS_CURRENT" datatype="VARCHAR" size="1" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.IS_CURRENT"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_LOC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.END_DATE_LOC"/>
</DIAttributes>
</DIElement>
<DIElement name="END_DATE_UTC" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="CS_MD_FLAG_CS_UPD.END_DATE_UTC"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_BUSINESS_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_BUSINESS_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_ENTERPRISE_KEY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_ENTERPRISE_KEY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.MD_FLAG" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="MD_FLAG" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.EXCHANGE_RATE" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="EXCHANGE_RATE" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.SOURCE_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="SOURCE_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.PRIORITY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="PRIORITY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.START_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="START_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.START_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="START_DATE_UTC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.TARGET_CURRENCY" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="TARGET_CURRENCY" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.IS_CURRENT" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="IS_CURRENT" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.END_DATE_LOC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="END_DATE_LOC" />
</DIExpression>
<DIExpression isString="true" expr="CS_MD_FLAG_CS_UPD.END_DATE_UTC" >
<COLUMN_REFERENCE  qualifier1="CS_MD_FLAG_CS_UPD" column="END_DATE_UTC" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="CS_MD_FLAG_CS_UPD" />
</DIFrom>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DITransformCall typeId="111" name="Map_Operation" >
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="Flag records as update"/>
<DIAttribute name="ui_display_name" value="MO_Update"/>
</DIUIOptions>
<DIInputView name="QRY_UPD"  />
<DISchema name="MO_Update_1" >
</DISchema>
<DIAttributes>
<DIAttribute name="delete" value="discard"/>
<DIAttribute name="insert" value="discard"/>
<DIAttribute name="normal" value="update"/>
<DIAttribute name="update" value="discard"/>
</DIAttributes>
</DITransformCall>
<DIDatabaseTableSource typeId="22" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_MSC" >
<DIOutputView name="EXCHANGE_MSC"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_CSNP" >
<DIInputView name="CASE_LOAD_RE_RUN"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>no</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>


<!-- GUID is optional -->
<DITransformCall typeId="210" name="Case_Operation"  >
<DIUIOptions>
<DIAttribute name="CASE_LOAD_FIRST_RUN" value="$P_LATEST_WF_STATUS IS NULL and ($G_DEBUG_MODE &lt;&gt;1 or $G_DEBUG_MODE IS NULL) and ($G_TRACE_MODE &lt;&gt;1 or $G_TRACE_MODE IS NULL)"/>
<DIAttribute name="CASE_LOAD_RE_RUN" value="DEFAULT"/>
<DIAttribute name="ui_acta_from_schema_0" value="MRG_1"/>
<DIAttribute name="ui_display_name" value="CASE_LOAD"/>
</DIUIOptions>
<DIInputView name="MRG_1" />
<DISchema name="CASE_LOAD" >
</DISchema>
<DICase>
<DISwitch label="FIRST_RUN" outputView="CASE_LOAD_FIRST_RUN" isDefault="false">
<DIExpression isString="true" expr="((($P_LATEST_WF_STATUS IS  NULL ) AND&#xA;   (  (($G_DEBUG_MODE != 1) OR&#xA;   ($G_DEBUG_MODE IS  NULL ))  )) AND&#xA;   (  (($G_TRACE_MODE != 1) OR&#xA;   ($G_TRACE_MODE IS  NULL ))  ))" >
<LOGICAL_OP op="AND">
<LOGICAL_OP op="AND">
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$P_LATEST_WF_STATUS" />
</LOGICAL_OP>
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$G_DEBUG_MODE" />
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$G_DEBUG_MODE" />
</LOGICAL_OP>
</LOGICAL_OP>
</LOGICAL_OP>
<LOGICAL_OP op="OR">
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$G_TRACE_MODE" />
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$G_TRACE_MODE" />
</LOGICAL_OP>
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
</DISwitch>
<DISwitch label="RE_RUN" outputView="CASE_LOAD_RE_RUN" isDefault="true">
</DISwitch>
</DICase>
<DIAttributes>
<DIAttribute name="Mutually_Exclusive" value="yes"/>
<DIAttribute name="Preserve_Expression_Order" value="no"/>
</DIAttributes>
</DITransformCall>
<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DWSTAGING_DS" ownerName="DWSTAGING_ALIAS" tableName="EXCHANGE_CSNP" >
<DIInputView name="CASE_LOAD_FIRST_RUN"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <bulk_ldr_all_rows/>
                <bulk_ldr_max_errors/>
                <bulk_ldr_rows_per_commit/>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>No</ignore_columns_null>
                <ignore_columns_value/>
                <loader_auto_correct>no</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_delete_map/>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_insert_map/>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>overflow_file</loader_overflow_file>
                <loader_post_load1/>
                <loader_pre_load1/>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_update_map/>
                <loader_use_user_defined_keys>no</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <overriding_substitution_parameter_for_tablename/>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
                <sql_text/>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DWSTAGING_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="DW_PRIORITY_TSNP_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;#__INTEGRATED_ENTITIES&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="DW_PRIORITY_SSNP_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities That must run completely before the main set of entities."/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:49:17"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the PERIODIC SNAPSHOT ETL Step. It integrates the following entities:&#xD;&#xA;#__INTEGRATED_ENTITIES&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>

</DataIntegratorExport>

